Class: Devise::Api::TokensService::Create
- Inherits:
-
BaseService
- Object
- BaseService
- Devise::Api::TokensService::Create
- Defined in:
- app/services/devise/api/tokens_service/create.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/services/devise/api/tokens_service/create.rb', line 10 def call return Failure(error: :invalid_resource_owner) unless resource_owner.respond_to?(:access_tokens) devise_api_token = yield create_devise_api_token Success(devise_api_token) end |