Setting email for OpenShift connector

This commit is contained in:
Andrew Block 2020-02-21 16:53:46 +01:00
parent b9787d48ac
commit 76bb453ff3
No known key found for this signature in database
GPG key ID: 02DFE631AEF35EBC
2 changed files with 2 additions and 0 deletions

View file

@ -177,6 +177,7 @@ func (c *openshiftConnector) HandleCallback(s connector.Scopes, r *http.Request)
UserID: user.UID,
Username: user.Name,
PreferredUsername: user.Name,
Email: user.Name,
Groups: user.Groups,
}

View file

@ -180,6 +180,7 @@ func TestCallbackIdentity(t *testing.T) {
expectEquals(t, identity.UserID, "12345")
expectEquals(t, identity.Username, "jdoe")
expectEquals(t, identity.PreferredUsername, "jdoe")
expectEquals(t, identity.Email, "jdoe")
expectEquals(t, len(identity.Groups), 1)
expectEquals(t, identity.Groups[0], "users")
}