class Rack::OAuth2::Server::Resource::Unauthorized

Public Instance Methods

finish() click to toggle source
# File lib/rack/oauth2/server/resource/error.rb, line 13
def finish
  super do |response|
    self.realm ||= DEFAULT_REALM
    header = response.header['WWW-Authenticate'] = "#{scheme} realm=\"#{realm}\""
    if ErrorMethods::DEFAULT_DESCRIPTION.keys.include?(error)
      header << ", error=\"#{error}\""
      header << ", error_description=\"#{description}\"" if description.present?
      header << ", error_uri=\"#{uri}\""                 if uri.present?
    end
  end
end
scheme() click to toggle source
# File lib/rack/oauth2/server/resource/error.rb, line 9
def scheme
  raise 'Define me!'
end