class Doorkeeper::OAuth::ForbiddenTokenResponse

def self.from_scopes(scopes, attributes = {})

def self.from_scopes(scopes, attributes = {})
  new(attributes.merge(scopes: scopes))
end

def description

def description
  @description ||= I18n.t("doorkeeper.errors.messages.forbidden_token.missing_scope",
                          oauth_scopes: @scopes.map(&:to_s).join(" "),)
end

def exception_class

def exception_class
  Doorkeeper::Errors::TokenForbidden
end

def headers

def headers
  headers = super
  headers.delete "WWW-Authenticate"
  headers
end

def initialize(attributes = {})

def initialize(attributes = {})
  super(attributes.merge(name: :invalid_scope, state: :forbidden))
  @scopes = attributes[:scopes]
end

def status

def status
  :forbidden
end