X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8daccc2ab3f2178745d12bc54ec9a8d06d88864a..9c8a812148e6b989fd7ab6aac49168276f5d5b9f:/sdk/go/arvadostest/oidc_provider.go diff --git a/sdk/go/arvadostest/oidc_provider.go b/sdk/go/arvadostest/oidc_provider.go index de21302e5a..fa5e55c42e 100644 --- a/sdk/go/arvadostest/oidc_provider.go +++ b/sdk/go/arvadostest/oidc_provider.go @@ -29,6 +29,8 @@ type OIDCProvider struct { AuthEmail string AuthEmailVerified bool AuthName string + AuthGivenName string + AuthFamilyName string AccessTokenPayload map[string]interface{} PeopleAPIResponse map[string]interface{} @@ -96,6 +98,8 @@ func (p *OIDCProvider) serveOIDC(w http.ResponseWriter, req *http.Request) { "email": p.AuthEmail, "email_verified": p.AuthEmailVerified, "name": p.AuthName, + "given_name": p.AuthGivenName, + "family_name": p.AuthFamilyName, "alt_verified": true, // for custom claim tests "alt_email": "alt_email@example.com", // for custom claim tests "alt_username": "desired-username", // for custom claim tests @@ -131,8 +135,8 @@ func (p *OIDCProvider) serveOIDC(w http.ResponseWriter, req *http.Request) { json.NewEncoder(w).Encode(map[string]interface{}{ "sub": "fake-user-id", "name": p.AuthName, - "given_name": p.AuthName, - "family_name": "", + "given_name": p.AuthGivenName, + "family_name": p.AuthFamilyName, "alt_username": "desired-username", "email": p.AuthEmail, "email_verified": p.AuthEmailVerified,