Module: JwtApiAuth::Helpers
- Defined in:
- lib/jwt_api_auth/helpers.rb
Instance Method Summary collapse
- #refresh_token_enabled? ⇒ Boolean
- #refresh_token_model_class ⇒ Object
- #refresh_token_model_name ⇒ Object
- #resource_class ⇒ Object
- #resource_name ⇒ Object
Instance Method Details
#refresh_token_enabled? ⇒ Boolean
21 22 23 |
# File 'lib/jwt_api_auth/helpers.rb', line 21 def refresh_token_enabled? JwtApiAuth.refresh_token_model.present? end |
#refresh_token_model_class ⇒ Object
17 18 19 |
# File 'lib/jwt_api_auth/helpers.rb', line 17 def refresh_token_model_class refresh_token_model_name.classify.constantize end |
#refresh_token_model_name ⇒ Object
13 14 15 |
# File 'lib/jwt_api_auth/helpers.rb', line 13 def refresh_token_model_name JwtApiAuth.refresh_token_model.to_s end |
#resource_class ⇒ Object
9 10 11 |
# File 'lib/jwt_api_auth/helpers.rb', line 9 def resource_class resource_name.classify.constantize end |
#resource_name ⇒ Object
5 6 7 |
# File 'lib/jwt_api_auth/helpers.rb', line 5 def resource_name JwtApiAuth.model.to_s end |