class Doorkeeper::OAuth::ClientCredentials::Issuer

def create_token(client, scopes, attributes, creator)

def create_token(client, scopes, attributes, creator)
  context = Authorization::Token.build_context(
    client,
    Doorkeeper::OAuth::CLIENT_CREDENTIALS,
    scopes,
    nil,
  )
  ttl = Authorization::Token.access_token_expires_in(@server, context)
  creator.call(
    client,
    scopes,
    use_refresh_token: false,
    expires_in: ttl,
    **attributes
  )
end