Merge pull request #1661 from sabre1041/openshift-connector-mail

Setting email for OpenShift connector
This commit is contained in:
Nándor István Krácser 2020-02-21 17:02:50 +01:00 committed by GitHub
commit 2bd4886517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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, UserID: user.UID,
Username: user.Name, Username: user.Name,
PreferredUsername: user.Name, PreferredUsername: user.Name,
Email: user.Name,
Groups: user.Groups, Groups: user.Groups,
} }

View File

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