func whoAmI(client *client.Client) (*api.User, error) { me, err := client.Users().Get("~") if err != nil { return nil, err } return me, nil }
func verifyOpenShiftUser(client *client.Client) error { if _, err := client.Users().Get("~"); err != nil { log.Errorf("Get user failed with error: %s", err) if kerrors.IsUnauthorized(err) || kerrors.IsForbidden(err) { return ErrOpenShiftAccessDenied } return err } return nil }