From 76bb453ff329c9bfb998e921c16434a5c3e28f64 Mon Sep 17 00:00:00 2001 From: Andrew Block Date: Fri, 21 Feb 2020 16:53:46 +0100 Subject: [PATCH] Setting email for OpenShift connector --- connector/openshift/openshift.go | 1 + connector/openshift/openshift_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/connector/openshift/openshift.go b/connector/openshift/openshift.go index 6ac5d044..090d04ff 100644 --- a/connector/openshift/openshift.go +++ b/connector/openshift/openshift.go @@ -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, } diff --git a/connector/openshift/openshift_test.go b/connector/openshift/openshift_test.go index 316af60a..d4efa14d 100644 --- a/connector/openshift/openshift_test.go +++ b/connector/openshift/openshift_test.go @@ -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") }