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.
Constructor Details
#initialize(username, password) ⇒ BasicCredentials
Returns a new instance of BasicCredentials.
15 16 17 18 |
# File 'lib/cli/client/credentials.rb', line 15 def initialize(username, password) @username = username @password = password end |
Instance Method Details
#authorization_header ⇒ Object
20 21 22 |
# File 'lib/cli/client/credentials.rb', line 20 def 'Basic ' + Base64.encode64("#{@username}:#{@password}").strip end |