-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store the signed ID Token in user session.
Previously the real signature was removed, and a plain (unsigned) JWT containing the same claims as the original ID Token was stored in the session. This prevented it from being properly validated when forwarded as 'id_token_hint' in logout requests.
- Loading branch information
Showing
6 changed files
with
53 additions
and
23 deletions.
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
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from jwkest.jwk import SYMKey | ||
from oic import rndstr | ||
from oic.oic import IdToken | ||
|
||
|
||
def signed_id_token(claims): | ||
id_token = IdToken(**claims) | ||
signing_key = SYMKey(alg='HS256', key=rndstr()) | ||
jws = id_token.to_jwt(key=[signing_key], algorithm=signing_key.alg) | ||
return jws, signing_key |