Class: Hover::Client::BasicAuth
- Defined in:
- lib/hover/client/basic_auth.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from HTTP
Instance Method Summary collapse
- #authenticate(request) ⇒ Object
-
#initialize(username, password) ⇒ BasicAuth
constructor
A new instance of BasicAuth.
Methods inherited from HTTP
#delete, #get, #get_redirect_location, #make_form_request, #make_request, #make_uri, #parse_response, #patch, #post, #put, #raise_errors, #raise_errors_for_cloudfront_response
Constructor Details
#initialize(username, password) ⇒ BasicAuth
Returns a new instance of BasicAuth.
8 9 10 11 |
# File 'lib/hover/client/basic_auth.rb', line 8 def initialize(username, password) self.username = username self.password = password end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/hover/client/basic_auth.rb', line 6 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'lib/hover/client/basic_auth.rb', line 6 def username @username end |
Instance Method Details
#authenticate(request) ⇒ Object
13 14 15 |
# File 'lib/hover/client/basic_auth.rb', line 13 def authenticate(request) request.basic_auth(username, password) end |