Class: OmniAuth::Strategies::Medpass
- Inherits:
-
OpenID
- Object
- OpenID
- OmniAuth::Strategies::Medpass
- Defined in:
- lib/omniauth/strategies/medpass.rb
Constant Summary collapse
- URI_SCHEME_REGEXP =
/[#{URI::REGEXP::PATTERN::ALPHA}][-+.#{URI::REGEXP::PATTERN::ALPHA}\d]*/
Instance Method Summary collapse
Instance Method Details
#dummy_app ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/omniauth/strategies/medpass.rb', line 40 def dummy_app lambda{|env| [401, {"WWW-Authenticate" => Rack::OpenID.build_header( :identifier => identifier, :return_to => callback_url, :required => .required, :optional => .optional, :policy_url => .policy_url, :method => 'post' )}, []]} end |
#get_identifier ⇒ Object
51 52 53 54 55 56 |
# File 'lib/omniauth/strategies/medpass.rb', line 51 def get_identifier f = OmniAuth::Form.new(:title => 'Medpass Authentication') f.label_field('Medpass Identifier', .identifier_param) f.input_field('url', .identifier_param) f.to_response end |
#identifier ⇒ Object
58 59 60 61 62 |
# File 'lib/omniauth/strategies/medpass.rb', line 58 def identifier i = request.params[.identifier_param.to_s] i = i !~ /\S/ ? nil : openid_url_from_login(i) i end |