class Doorkeeper::OAuth::ClientCredentialsRequest::Creator
def call(client, scopes, attributes = {})
def call(client, scopes, attributes = {}) existing_token = existing_token_for(client, scopes) if Doorkeeper.configuration.reuse_access_token && existing_token&.reusable? return existing_token end existing_token&.revoke AccessToken.find_or_create_for( client, nil, scopes, attributes[:expires_in], attributes[:use_refresh_token] ) end
def existing_token_for(client, scopes)
def existing_token_for(client, scopes) Doorkeeper::AccessToken.matching_token_for client, nil, scopes end