CurrentUser returns user information decoded from the JWT access token in .cf/config.json.
()
| 12 | // CurrentUser returns user information decoded from the JWT access token in |
| 13 | // .cf/config.json. |
| 14 | func (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() |
| 19 | func (config DefaultUserConfig) CurrentUserName() (string, error) { |
no test coverage detected