mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-28 23:06:34 +00:00
add "username" as claim key (#98)
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user