Class: Rack::Auth::AbstractHandler
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/rack/auth/abstract/handler.rb |
Overview
AbstractHandler
implements common authentication functionality.
#realm should be set for all handlers.
Class Method Summary
Instance Attribute Summary
- #realm rw
Instance Method Summary
- #bad_request private
- #unauthorized(www_authenticate = challenge) private
Constructor Details
.new(app, realm = nil, &authenticator) ⇒ AbstractHandler
Instance Attribute Details
#realm (rw)
[ GitHub ]# File 'lib/rack/auth/abstract/handler.rb', line 13
attr_accessor :realm
Instance Method Details
#bad_request (private)
[ GitHub ]# File 'lib/rack/auth/abstract/handler.rb', line 31
def bad_request return [ 400, { CONTENT_TYPE => 'text/plain', CONTENT_LENGTH => '0' }, [] ] end
#unauthorized(www_authenticate = challenge) (private)
[ GitHub ]# File 'lib/rack/auth/abstract/handler.rb', line 22
def (www_authenticate = challenge) return [ 401, { CONTENT_TYPE => 'text/plain', CONTENT_LENGTH => '0', 'www-authenticate' => www_authenticate.to_s }, [] ] end