Class: RackMyOpenid::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/rack_my_openid/handler.rb

Defined Under Namespace

Classes: BadRequest, UntrustedRealm

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Handler

Returns a new instance of Handler.



13
14
15
# File 'lib/rack_my_openid/handler.rb', line 13

def initialize(options)
  @options = options
end

Instance Method Details

#cancel(params) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/rack_my_openid/handler.rb', line 25

def cancel(params)
  if request = openid_server.decode_request(params)
    return openid_server.encode_response cancel_check_id_request(request) 
  else
    raise BadRequest
  end
end

#handle(params, session) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/rack_my_openid/handler.rb', line 17

def handle(params, session)
  if request = openid_server.decode_request(params)
    return openid_server.encode_response handle_openid_request(request, session)
  else
    raise BadRequest
  end
end