Class: OmniAuth::Strategies::OpenID
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::OpenID
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth/strategies/open_id.rb
Overview
OmniAuth strategy for connecting via OpenID. This allows for connection to a wide variety of sites, some of which are listed on the OpenID website.
Direct Known Subclasses
Constant Summary collapse
- IDENTIFIER_URL_PARAMETER =
'openid_url'
- AX =
{ :email => 'http://axschema.org/contact/email', :name => 'http://axschema.org/namePerson', :nickname => 'http://axschema.org/namePerson/friendly', :first_name => 'http://axschema.org/namePerson/first', :last_name => 'http://axschema.org/namePerson/last', :city => 'http://axschema.org/contact/city/home', :state => 'http://axschema.org/contact/state/home', :website => 'http://axschema.org/contact/web/default', :image => 'http://axschema.org/media/image/aspect11' }
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(app, store = nil, options = {}, &block) ⇒ OpenID
constructor
Initialize the strategy as a Rack Middleware.
Constructor Details
#initialize(app, store = nil, options = {}, &block) ⇒ OpenID
Initialize the strategy as a Rack Middleware.
38 39 40 41 42 43 44 |
# File 'lib/omniauth/strategies/open_id.rb', line 38 def initialize(app, store = nil, = {}, &block) super(app, ([:name] || :open_id), &block) @options = @options[:required] ||= [AX[:email], AX[:name], AX[:first_name], AX[:last_name], 'email', 'fullname'] @options[:optional] ||= [AX[:nickname], AX[:city], AX[:state], AX[:website], AX[:image], 'postcode', 'nickname'] @store = store end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
12 13 14 |
# File 'lib/omniauth/strategies/open_id.rb', line 12 def @options end |