MCPcopy Index your code
hub / github.com/cloudfoundry/cli / CurrentUser

Method CurrentUser

util/configv3/default_user_config.go:14–16  ·  view source on GitHub ↗

CurrentUser returns user information decoded from the JWT access token in .cf/config.json.

()

Source from the content-addressed store, hash-verified

12// CurrentUser returns user information decoded from the JWT access token in
13// .cf/config.json.
14func (config DefaultUserConfig) CurrentUser() (User, error) {
15 return decodeUserFromJWT(config.ConfigFile.AccessToken)
16}
17
18// CurrentUserName returns the name of a user as returned by CurrentUser()
19func (config DefaultUserConfig) CurrentUserName() (string, error) {

Callers 1

CurrentUserNameMethod · 0.95

Calls 1

decodeUserFromJWTFunction · 0.85

Tested by

no test coverage detected