Method: Devise::Strategies::TokenAuthenticatable#authenticate!
- Defined in:
- lib/devise/strategies/token_authenticatable.rb
#authenticate! ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/devise/strategies/token_authenticatable.rb', line 13 def authenticate! resource = mapping.to.find_for_token_authentication(authentication_hash) if validate(resource) resource.after_token_authentication success!(resource) else fail(:invalid_token) end end |