Module: SimpleTokenAuthentication::ActsAsTokenAuthenticationHandler
- Defined in:
- lib/simple_token_authentication/acts_as_token_authentication_handler.rb
Instance Method Summary collapse
- #acts_as_token_authentication_handler ⇒ Object
-
#acts_as_token_authentication_handler_for(model, options = {}) ⇒ Object
This module ensures that no TokenAuthenticationHandler behaviour is added before the class actually ‘acts_as_token_authentication_handler_for` some token authenticatable model.
Instance Method Details
#acts_as_token_authentication_handler ⇒ Object
17 18 19 20 |
# File 'lib/simple_token_authentication/acts_as_token_authentication_handler.rb', line 17 def acts_as_token_authentication_handler ::ActiveSupport::Deprecation.warn "`acts_as_token_authentication_handler()` is deprecated and may be removed from future releases, use `acts_as_token_authentication_handler_for(User)` instead.", caller acts_as_token_authentication_handler_for User end |
#acts_as_token_authentication_handler_for(model, options = {}) ⇒ Object
This module ensures that no TokenAuthenticationHandler behaviour is added before the class actually ‘acts_as_token_authentication_handler_for` some token authenticatable model. See github.com/gonzalo-bulnes/simple_token_authentication/issues/8#issuecomment-31707201
12 13 14 15 |
# File 'lib/simple_token_authentication/acts_as_token_authentication_handler.rb', line 12 def acts_as_token_authentication_handler_for(model, = {}) include SimpleTokenAuthentication::TokenAuthenticationHandler handle_token_authentication_for(model, ) end |