Class: Rosemary::BasicAuthClient
- Defined in:
- lib/rosemary/basic_auth_client.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
The password to be used to authenticate the user against the OMS API.
-
#username ⇒ Object
readonly
The username to be used to authenticate the user against the OMS API.
Instance Method Summary collapse
-
#credentials ⇒ Hash
The username and password credentials as a Hash.
-
#initialize(username, password) ⇒ BasicAuthClient
constructor
A new instance of BasicAuthClient.
-
#inspect ⇒ Object
Override inspect message to keep the password from showing up in any logfile.
Constructor Details
#initialize(username, password) ⇒ BasicAuthClient
Returns a new instance of BasicAuthClient.
9 10 11 12 |
# File 'lib/rosemary/basic_auth_client.rb', line 9 def initialize(username, password) @username = username @password = password end |
Instance Attribute Details
#password ⇒ Object (readonly)
The password to be used to authenticate the user against the OMS API
7 8 9 |
# File 'lib/rosemary/basic_auth_client.rb', line 7 def password @password end |
#username ⇒ Object (readonly)
The username to be used to authenticate the user against the OMS API
4 5 6 |
# File 'lib/rosemary/basic_auth_client.rb', line 4 def username @username end |
Instance Method Details
#credentials ⇒ Hash
The username and password credentials as a Hash
16 17 18 |
# File 'lib/rosemary/basic_auth_client.rb', line 16 def credentials {:username => username, :password => password} end |
#inspect ⇒ Object
Override inspect message to keep the password from showing up in any logfile.
22 23 24 |
# File 'lib/rosemary/basic_auth_client.rb', line 22 def inspect "#<#{self.class.name}:#{self.object_id} @username='#{username}'>" end |