MCPcopy Create free account
hub / github.com/cloudfoundry/credhub-cli / refreshConfiguration

Function refreshConfiguration

commands/token.go:30–43  ·  view source on GitHub ↗
(cfg config.Config)

Source from the content-addressed store, hash-verified

28}
29
30func refreshConfiguration(cfg config.Config) config.Config {
31 credhubClient, _ := initializeCredhubClient(cfg)
32 authObject := credhubClient.Auth
33 oauth := authObject.(*auth.OAuthStrategy)
34 err := oauth.Refresh()
35
36 if err != nil {
37 return cfg
38 }
39
40 cfg.AccessToken = oauth.AccessToken()
41 cfg.RefreshToken = oauth.RefreshToken()
42 return cfg
43}

Callers 1

initFunction · 0.85

Calls 4

initializeCredhubClientFunction · 0.85
RefreshMethod · 0.80
AccessTokenMethod · 0.80
RefreshTokenMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…