Class: Bosh::Cli::Client::BasicCredentials
- Defined in:
- lib/cli/client/credentials.rb
Instance Method Summary collapse
- #authorization_header ⇒ Object
-
#initialize(username, password) ⇒ BasicCredentials
constructor
A new instance of BasicCredentials.
- #refresh ⇒ Object
- #username ⇒ Object
Constructor Details
#initialize(username, password) ⇒ BasicCredentials
Returns a new instance of BasicCredentials.
24 25 26 27 |
# File 'lib/cli/client/credentials.rb', line 24 def initialize(username, password) @username = username @password = password end |
Instance Method Details
#authorization_header ⇒ Object
33 34 35 |
# File 'lib/cli/client/credentials.rb', line 33 def 'Basic ' + Base64.encode64("#{@username}:#{@password}").strip end |
#refresh ⇒ Object
37 38 39 |
# File 'lib/cli/client/credentials.rb', line 37 def refresh false end |
#username ⇒ Object
29 30 31 |
# File 'lib/cli/client/credentials.rb', line 29 def username @username end |