Skip to content

Commit ea86029

Browse files
author
Alex Kornitzer
committed
tweak: pull out other username fields
1 parent 971aaad commit ea86029

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

snake/core/snake_handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ def wrapper( # type: ignore
7979
)
8080
except:
8181
raise web.HTTPError(401)
82-
self.current_user = decoded.get("preferred_username")
82+
self.current_user = (
83+
decoded.get("preferred_username")
84+
or decoded.get("upn")
85+
or decoded.get("email")
86+
)
8387
if not self.current_user:
8488
raise web.HTTPError(401)
8589
return method(self, *args, **kwargs)

0 commit comments

Comments
 (0)