class Doorkeeper::OAuth::ForbiddenTokenResponse
Public Class Methods
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 6 def self.from_scopes(scopes, attributes = {}) new(attributes.merge(scopes: scopes)) end
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 10 def initialize(attributes = {}) super(attributes.merge(name: :invalid_scope, state: :forbidden)) @scopes = attributes[:scopes] end
Calls superclass method
Doorkeeper::OAuth::ErrorResponse::new
Public Instance Methods
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 25 def description @description ||= I18n.t("doorkeeper.errors.messages.forbidden_token.missing_scope", oauth_scopes: @scopes.map(&:to_s).join(" "),) end
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 19 def headers headers = super headers.delete "WWW-Authenticate" headers end
Calls superclass method
Doorkeeper::OAuth::ErrorResponse#headers
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 15 def status :forbidden end
Protected Instance Methods
Source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 32 def exception_class Doorkeeper::Errors::TokenForbidden end