Class: Jsapi::Controller::Authentication::Credentials::HTTP::Base
- Inherits:
-
Object
- Object
- Jsapi::Controller::Authentication::Credentials::HTTP::Base
- Defined in:
- lib/jsapi/controller/authentication/credentials/http/base.rb
Overview
Holds credentials passed according to HTTP Authentication.
Instance Attribute Summary collapse
-
#auth_param ⇒ Object
readonly
Returns the value of attribute auth_param.
-
#auth_scheme ⇒ Object
readonly
Returns the value of attribute auth_scheme.
Instance Method Summary collapse
-
#initialize(authorization) ⇒ Base
constructor
A new instance of Base.
-
#well_formed? ⇒ Boolean
Returns true if the credentials are syntactically correct.
Constructor Details
#initialize(authorization) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/jsapi/controller/authentication/credentials/http/base.rb', line 12 def initialize() @auth_scheme, @auth_param = .to_s.split(' ', 2) end |
Instance Attribute Details
#auth_param ⇒ Object (readonly)
Returns the value of attribute auth_param.
10 11 12 |
# File 'lib/jsapi/controller/authentication/credentials/http/base.rb', line 10 def auth_param @auth_param end |
#auth_scheme ⇒ Object (readonly)
Returns the value of attribute auth_scheme.
10 11 12 |
# File 'lib/jsapi/controller/authentication/credentials/http/base.rb', line 10 def auth_scheme @auth_scheme end |
Instance Method Details
#well_formed? ⇒ Boolean
Returns true if the credentials are syntactically correct.
17 18 19 |
# File 'lib/jsapi/controller/authentication/credentials/http/base.rb', line 17 def well_formed? auth_scheme.present? && auth_param.present? end |