Class: OmniAuth::Strategies::Yubikey
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::Yubikey
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth/strategies/yubikey.rb
Instance Attribute Summary collapse
-
#api_id ⇒ Object
Returns the value of attribute api_id.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#options ⇒ Object
Returns the value of attribute options.
-
#otp_id ⇒ Object
readonly
Returns the value of attribute otp_id.
Instance Method Summary collapse
-
#initialize(app, api_id = nil, api_key = nil, options = {}, &block) ⇒ Yubikey
constructor
A new instance of Yubikey.
- #request_phase ⇒ Object
Constructor Details
#initialize(app, api_id = nil, api_key = nil, options = {}, &block) ⇒ Yubikey
Returns a new instance of Yubikey.
13 14 15 16 17 18 |
# File 'lib/omniauth/strategies/yubikey.rb', line 13 def initialize(app, api_id = nil, api_key = nil, = {}, &block) self.api_id = api_id self.api_key = api_key super(app, :yubikey, , &block) end |
Instance Attribute Details
#api_id ⇒ Object
Returns the value of attribute api_id.
9 10 11 |
# File 'lib/omniauth/strategies/yubikey.rb', line 9 def api_id @api_id end |
#api_key ⇒ Object
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/omniauth/strategies/yubikey.rb', line 9 def api_key @api_key end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/omniauth/strategies/yubikey.rb', line 9 def @options end |
#otp_id ⇒ Object (readonly)
Returns the value of attribute otp_id.
11 12 13 |
# File 'lib/omniauth/strategies/yubikey.rb', line 11 def otp_id @otp_id end |
Instance Method Details
#request_phase ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/omniauth/strategies/yubikey.rb', line 20 def request_phase if env["REQUEST_METHOD"] == "GET" get_credentials else perform end end |