Class: Bosh::Cli::Client::UaaCredentials

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

Instance Method Summary collapse

Constructor Details

#initialize(token_provider) ⇒ UaaCredentials

Returns a new instance of UaaCredentials.



5
6
7
# File 'lib/cli/client/credentials.rb', line 5

def initialize(token_provider)
  @token_provider = token_provider
end

Instance Method Details

#authorization_headerObject



13
14
15
# File 'lib/cli/client/credentials.rb', line 13

def authorization_header
  @token_provider.token
end

#refreshObject



17
18
19
20
# File 'lib/cli/client/credentials.rb', line 17

def refresh
  @token_provider.refresh
  true
end

#usernameObject



9
10
11
# File 'lib/cli/client/credentials.rb', line 9

def username
  @token_provider.username
end