From 33173ecd6a83ce4c71c9e9b4d220d9a00af82546 Mon Sep 17 00:00:00 2001 From: Cosmin Tupangiu Date: Wed, 11 Dec 2024 14:17:32 +0100 Subject: [PATCH] auth: Fix user claim name The right claim for the username is _preffered_username_. Signed-off-by: Cosmin Tupangiu --- internal/auth/rhsso_authenticator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth/rhsso_authenticator.go b/internal/auth/rhsso_authenticator.go index 9416d08..b005f04 100644 --- a/internal/auth/rhsso_authenticator.go +++ b/internal/auth/rhsso_authenticator.go @@ -55,7 +55,7 @@ func (rh *RHSSOAuthenticator) parseToken(userToken *jwt.Token) (User, error) { } return User{ - Username: claims["username"].(string), + Username: claims["preffered_username"].(string), Organization: claims["org_id"].(string), ClientID: claims["client_id"].(string), }, nil