Class: Doorkeeper::OAuth::ForbiddenTokenResponse
Constant Summary
ErrorResponse::NON_REDIRECTABLE_STATES
Class Method Summary
collapse
Instance Method Summary
collapse
#body, from_request, #raise_exception!, #redirect_uri, #redirectable?
#body, #redirect_uri, #redirectable?
Constructor Details
10
11
12
13
|
# 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
|
Class Method Details
.from_scopes(scopes, attributes = {}) ⇒ Object
6
7
8
|
# File 'lib/doorkeeper/oauth/forbidden_token_response.rb', line 6
def self.from_scopes(scopes, attributes = {})
new(attributes.merge(scopes: scopes))
end
|
Instance Method Details
#description ⇒ Object
25
26
27
28
|
# 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
|
19
20
21
22
23
|
# File 'lib/doorkeeper/oauth/forbidden_token_response.rb', line 19
def
= super
.delete "WWW-Authenticate"
end
|
#status ⇒ Object
15
16
17
|
# File 'lib/doorkeeper/oauth/forbidden_token_response.rb', line 15
def status
:forbidden
end
|