Commit d9ca4b50ecc26fb9cfeed959b8c87088391cd62b
1 parent
c22cd557
Exists in
master
and in
1 other branch
Correcting sintax erros and start strategies tests"
Showing
3 changed files
with
7 additions
and
4 deletions
Show diff stats
lib/omniauth/remote_user.rb
lib/omniauth/strategies/remote_user.rb
1 | module OmniAuth | 1 | module OmniAuth |
2 | - module Stratagies | 2 | + module Strategies |
3 | class RemoteUser | 3 | class RemoteUser |
4 | include OmniAuth::Strategy | 4 | include OmniAuth::Strategy |
5 | 5 | ||
6 | + option :fields, [:name, :email] | ||
7 | + option :uid_field, :email | ||
8 | + | ||
6 | def call(env) | 9 | def call(env) |
7 | request = Rack::Request.new env | 10 | request = Rack::Request.new env |
8 | cookies = request.cookies | 11 | cookies = request.cookies |
spec/omniauth/strategies/remote_user_spec.rb
@@ -4,7 +4,7 @@ describe 'Test Strategy Remote_User' do | @@ -4,7 +4,7 @@ describe 'Test Strategy Remote_User' do | ||
4 | let(:app) do | 4 | let(:app) do |
5 | Rack::Builder.new do |b| | 5 | Rack::Builder.new do |b| |
6 | b.use Rack::Session::Cookie, :secret => 'abc123' | 6 | b.use Rack::Session::Cookie, :secret => 'abc123' |
7 | - b.use OmniAuth::Strategies::RemoteUser, :fields => [:name, :email], :uid_field => :name | 7 | + b.use OmniAuth::Strategies::RemoteUser#, :fields => [:name, :email], :uid_field => :name |
8 | b.run lambda { |_env| [200, {}, ['Not Found']] } | 8 | b.run lambda { |_env| [200, {}, ['Not Found']] } |
9 | end.to_app | 9 | end.to_app |
10 | end | 10 | end |