Class: Motor::AuthTokensController
- Inherits:
-
ApiBaseController
- Object
- ActionController::API
- ApiBaseController
- Motor::AuthTokensController
- Defined in:
- app/controllers/motor/auth_tokens_controller.rb
Constant Summary collapse
- GENERIC_TOKEN_TTL =
2.hours
Instance Method Summary collapse
Methods included from CurrentAbility
Methods included from CurrentUserMethod
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/motor/auth_tokens_controller.rb', line 9 def create return render json: {} unless current_user if defined?(Devise::JWT) respond_with_devise_jwt elsif defined?(JWT) respond_with_generic_jwt else render json: {} end end |