-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optionally ignore
jwt.exceptions.InvalidTokenErrors
when de…
…coding JWT cookie Also, `get_decoded_jwt_from_auth()` is now evaluated first in `utils.get_decoded_jwt()`.
- Loading branch information
1 parent
84a561c
commit 078fa38
Showing
7 changed files
with
78 additions
and
11 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
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,16 @@ | ||
""" | ||
All constants pertaining to the edx_rbac module. | ||
""" | ||
# The string denoting that a given role is applicable across all contexts | ||
ALL_ACCESS_CONTEXT = '*' | ||
|
||
# .. toggle_name: RBAC_IGNORE_INVALID_JWT_COOKIE | ||
# .. toggle_implementation: DjangoSetting | ||
# .. toggle_default: False | ||
# .. toggle_description: When true, causes instances of `jwt.exceptions.InvalidTokenError` | ||
# to be ignored instead of raised in the `get_decoded_jwt()` utility function. | ||
# Defaults to False for backward-compatibility purposes, but it's recommended | ||
# to be set to True in dependent applications. | ||
# .. toggle_use_cases: opt_in | ||
# .. toggle_creation_date: 2024-08-19 | ||
IGNORE_INVALID_JWT_COOKIE_SETTING = 'RBAC_IGNORE_INVALID_JWT_COOKIE' |
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