Class: Bosh::Cli::Client::Uaa::TokenProvider

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

Instance Method Summary collapse

Constructor Details

#initialize(auth_info, config, token_decoder, target) ⇒ TokenProvider


8
9
10
11
12
13
# File 'lib/cli/client/uaa/token_provider.rb', line 8

def initialize(auth_info, config, token_decoder, target)
  @auth_info = auth_info
  @config = config
  @token_decoder = token_decoder
  @target = target
end

Instance Method Details

#refreshObject


20
21
22
23
# File 'lib/cli/client/uaa/token_provider.rb', line 20

def refresh
  get_access_info(true)
  nil
end

#tokenObject


15
16
17
18
# File 'lib/cli/client/uaa/token_provider.rb', line 15

def token
  access_info = get_access_info
  access_info.auth_header if access_info
end

#usernameObject


25
26
27
# File 'lib/cli/client/uaa/token_provider.rb', line 25

def username
  get_access_info.username
end