Class: Rack::Auth::Basic::Request
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Auth::AbstractRequest
|
|
Instance Chain:
self,
Auth::AbstractRequest
|
|
Inherits: |
Rack::Auth::AbstractRequest
|
Defined in: | lib/rack/auth/basic.rb |
Constant Summary
Auth::AbstractRequest
- Inherited
Class Method Summary
Auth::AbstractRequest
- Inherited
Instance Attribute Summary
Instance Method Summary
Auth::AbstractRequest
- Inherited
Constructor Details
This class inherits a constructor from Rack::Auth::AbstractRequest
Instance Attribute Details
#basic? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rack/auth/basic.rb', line 43
def basic? "basic" == scheme && credentials.length == 2 end
Instance Method Details
#credentials
[ GitHub ]# File 'lib/rack/auth/basic.rb', line 47
def credentials @credentials ||= params.unpack1('m').split(':', 2) end
#username
[ GitHub ]# File 'lib/rack/auth/basic.rb', line 51
def username credentials.first end