-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added oauth / open id connect provider support
- Loading branch information
Showing
6 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def userinfo(claims, user): | ||
# Populate claims dict. | ||
claims["name"] = "{0} {1}".format(user.profile.first_name, user.profile.last_name) | ||
claims["given_name"] = user.profile.first_name or "NO_FIRSTNAME" | ||
claims["family_name"] = user.profile.last_name or "NO_LASTNAME" | ||
claims["nickname"] = user.profile.screen_name or "NO_SCREENNAME" | ||
claims["email"] = user.email | ||
claims["phone_number"] = user.profile.phone or "NO_PHONENUMBER" | ||
|
||
return claims |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ redis~=4.3.1 | |
twilio~=7.9.2 | ||
django-prometheus==2.2.0 | ||
psycopg2-binary~=2.9.6 | ||
django-oidc-provider~=0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters