Skip to content

Commit

Permalink
add "username" as claim key (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
fliaping authored Mar 15, 2024
1 parent db00db1 commit 6325c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/rdpgw/web/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (h *OIDC) HandleCallback(w http.ResponseWriter, r *http.Request) {
}

func findUsernameInClaims(data map[string]interface{}) string {
candidates := []string{"preferred_username", "unique_name", "upn"}
candidates := []string{"preferred_username", "unique_name", "upn", "username"}
for _, claim := range candidates {
userName, found := data[claim].(string)
if found {
Expand Down

0 comments on commit 6325c0c

Please sign in to comment.