Class: Bosh::Cli::Client::BasicCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/client/credentials.rb

Instance Method Summary collapse

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_headerObject



20
21
22
# File 'lib/cli/client/credentials.rb', line 20

def authorization_header
  'Basic ' + Base64.encode64("#{@username}:#{@password}").strip
end