CurrentUserName returns the name of a user as returned by CurrentUser()
()
| 17 | |
| 18 | // CurrentUserName returns the name of a user as returned by CurrentUser() |
| 19 | func (config DefaultUserConfig) CurrentUserName() (string, error) { |
| 20 | user, err := config.CurrentUser() |
| 21 | if err != nil { |
| 22 | return "", err |
| 23 | } |
| 24 | return user.Name, nil |
| 25 | } |
| 26 | |
| 27 | func decodeUserFromJWT(accessToken string) (User, error) { |
| 28 | if accessToken == "" { |
nothing calls this directly
no test coverage detected