mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2025-08-13 12:29:19 +02:00
add "username" as claim key
This commit is contained in:
parent
4cb8216c49
commit
9258bb442a
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ func (h *OIDC) HandleCallback(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func findUsernameInClaims(data map[string]interface{}) string {
|
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 {
|
for _, claim := range candidates {
|
||||||
userName, found := data[claim].(string)
|
userName, found := data[claim].(string)
|
||||||
if found {
|
if found {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue