class Doorkeeper::OAuth::ClientCredentialsRequest

def access_token

def access_token
  issuer.token
end

def custom_token_attributes_with_data

def custom_token_attributes_with_data
  parameters
    .with_indifferent_access
    .slice(*Doorkeeper.config.custom_access_token_attributes)
    .symbolize_keys
end

def initialize(server, client, parameters = {})

def initialize(server, client, parameters = {})
  @client = client
  @server = server
  @response = nil
  @original_scopes = parameters[:scope]
  @parameters = parameters.except(:scope)
end

def issuer

def issuer
  @issuer ||= ClientCredentials::Issuer.new(
    server,
    ClientCredentials::Validator.new(server, self),
  )
end

def valid?

def valid?
  issuer.create(client, scopes, custom_token_attributes_with_data)
end