Exception: Core::Exceptions::Unauthorized

Inherits:
OpaqueError show all
Defined in:
lib/svcbase/exceptions.rb

Overview

specialized class for 401

Constant Summary collapse

STATUS =
401
DEFAULT_MSGCODE =

force all subclasses to return this msgcode as well

:unauthorized

Constants inherited from Error

Error::DEFAULT_LOGLEVEL, Error::MESSAGE_SCOPE

Instance Attribute Summary

Attributes inherited from Error

#details, #loglevel, #msgcode, #msgobj

Instance Method Summary collapse

Methods inherited from OpaqueError

#initialize, #response

Methods inherited from Error

classname, default_loglevel, default_msgcode, #initialize, #logmsg, #response, #status

Constructor Details

This class inherits a constructor from Core::Exceptions::OpaqueError

Instance Method Details

#headersObject

ensure we have a WWW-Authenticate header as required by RFC



160
161
162
# File 'lib/svcbase/exceptions.rb', line 160

def headers
  @headers.merge('WWW-Authenticate' => 'Bearer')
end