Exception: Rack::OAuth2::Server::Resource::Unauthorized
- Inherits:
-
Abstract::Unauthorized
- Object
- StandardError
- Abstract::Error
- Abstract::Unauthorized
- Rack::OAuth2::Server::Resource::Unauthorized
- Defined in:
- lib/rack/oauth2/server/resource/error.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Abstract::Error
#description, #error, #realm, #status, #uri
Instance Method Summary collapse
Methods inherited from Abstract::Unauthorized
Methods inherited from Abstract::Error
Constructor Details
This class inherits a constructor from Rack::OAuth2::Server::Abstract::Unauthorized
Instance Method Details
#finish ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rack/oauth2/server/resource/error.rb', line 13 def finish super do |response| self.realm ||= DEFAULT_REALM headers = response.headers['WWW-Authenticate'] = "#{scheme} realm=\"#{realm}\"" if ErrorMethods::DEFAULT_DESCRIPTION.keys.include?(error) headers << ", error=\"#{error}\"" headers << ", error_description=\"#{description}\"" if description.present? headers << ", error_uri=\"#{uri}\"" if uri.present? end end end |
#scheme ⇒ Object
9 10 11 |
# File 'lib/rack/oauth2/server/resource/error.rb', line 9 def scheme raise 'Define me!' end |