Skip to content

Commit

Permalink
lib/rack/auth/openid.rb - updates to reflect rack styling
Browse files Browse the repository at this point in the history
darcs-hash:20071118200329-f4dbf-b760de7d7209a2378f0cd5c02a664b04522a66ef.gz
  • Loading branch information
scytrin committed Nov 18, 2007
1 parent 7725007 commit 23d2d55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rack/auth/openid.rb
Expand Up @@ -45,8 +45,8 @@ class OpenID < AbstractHandler
# into. (ex: 'http://mysite.com/')
# * :session_key defines the key to the session hash in the env.
# (by default it uses 'rack.session')
def initialize options={}, &block
raise 'No return url provided.' unless options[:return]
def initialize(options={})
raise ArgumentError, 'No return url provided.' unless options[:return]
warn 'No trust url provided.' unless options[:trust]
options[:trust] ||= options[:return]

Expand All @@ -67,7 +67,7 @@ def call(env)
end
end

def check session, oid_url, request=nil
def check(session, oid_url, env)
consumer = ::OpenID::Consumer.new session, OIDStore
oid = consumer.begin oid_url
return auth_fail unless oid.status == ::OpenID::SUCCESS
Expand All @@ -81,7 +81,7 @@ def check session, oid_url, request=nil
return 303, {'Location'=>oid.redirect_url( t_url, r_url )}, []
end

def finish session, params
def finis(session, params, env)
consumer = ::OpenID::Consumer.new session, OIDStore
oid = consumer.complete params
return bad_login unless oid.status == ::OpenID::SUCCESS
Expand Down

0 comments on commit 23d2d55

Please sign in to comment.