Class: DeviseOtt::Strategies::OttAuthentication
- Inherits:
-
Devise::Strategies::Authenticatable
- Object
- Devise::Strategies::Authenticatable
- DeviseOtt::Strategies::OttAuthentication
- Defined in:
- lib/devise_ott/strategies/ott_authetication.rb
Instance Method Summary collapse
Instance Method Details
#authenticate! ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/devise_ott/strategies/ott_authetication.rb', line 8 def authenticate! ott_token = params[:ott_token] resource = mapping.to.find_for_ott_authentication(ott_token) return unless resource if validate(resource){ resource.ott_allowed?(ott_token, resource.email) } success!(resource) end end |
#valid? ⇒ Boolean
4 5 6 |
# File 'lib/devise_ott/strategies/ott_authetication.rb', line 4 def valid? super || valid_for_ott_auth? end |