class Doorkeeper::OAuth::ForbiddenTokenResponse
Public Class Methods
from_scopes(scopes, attributes = {})
click to toggle source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 4 def self.from_scopes(scopes, attributes = {}) new(attributes.merge(scopes: scopes)) end
new(attributes = {})
click to toggle source
Calls superclass method
Doorkeeper::OAuth::ErrorResponse.new
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 8 def initialize(attributes = {}) super(attributes.merge(name: :invalid_scope, state: :forbidden)) @scopes = attributes[:scopes] end
Public Instance Methods
description()
click to toggle source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 23 def description scope = { scope: %[doorkeeper scopes] } @description ||= @scopes.map { |r| I18n.translate r, scope }.join('\n') end
headers()
click to toggle source
Calls superclass method
Doorkeeper::OAuth::ErrorResponse#headers
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 17 def headers headers = super headers.delete 'WWW-Authenticate' headers end
status()
click to toggle source
# File lib/doorkeeper/oauth/forbidden_token_response.rb, line 13 def status :forbidden end