Skip to content

Commit

Permalink
auth: Fix user claim name
Browse files Browse the repository at this point in the history
The right claim for the username is _preffered_username_.

Signed-off-by: Cosmin Tupangiu <[email protected]>
  • Loading branch information
tupyy committed Dec 11, 2024
1 parent c6bcdd6 commit 33173ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/auth/rhsso_authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33173ec

Please sign in to comment.