Class: Bosh::Cli::Client::Uaa::ClientTokenIssuer

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

Instance Method Summary collapse

Constructor Details

#initialize(auth_info, token_decoder) ⇒ ClientTokenIssuer


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

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

Instance Method Details

#access_info(_) ⇒ Object


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

def access_info(_)
  token = token_issuer.client_credentials_grant
  ClientAccessInfo.new(token, @token_decoder)
end

#promptsObject


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

def prompts
  {}
end

#refresh(_) ⇒ Object


22
23
24
25
# File 'lib/cli/client/uaa/client_token_issuer.rb', line 22

def refresh(_)
  # For client credentials there is no refresh token, so obtain access token again
  access_info(_)
end