Class: Devise::Api::TokensService::Create

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/devise/api/tokens_service/create.rb

Instance Method Summary collapse

Instance Method Details

#callObject



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