Skip to content

Commit

Permalink
docs: improve comments for issuer verification (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
robrap authored Apr 13, 2023
1 parent de1ce05 commit ae6b4ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions edx_rest_framework_extensions/auth/jwt/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def _decode_and_verify_token(token, jwt_issuer):

'verify_exp': api_settings.JWT_VERIFY_EXPIRATION,
'verify_aud': settings.JWT_AUTH.get('JWT_VERIFY_AUDIENCE', True),
'verify_iss': False, # TODO (ARCH-204): manually verify until issuer is configured correctly.
# See https://github.com/openedx/edx-drf-extensions/issues/327 for removing manual issuer verification.
'verify_iss': False, # Verified manually below
'verify_signature': False, # Verified with JWS already
}

Expand All @@ -272,7 +273,7 @@ def _decode_and_verify_token(token, jwt_issuer):
algorithms=[api_settings.JWT_ALGORITHM],
)

# TODO (ARCH-204): verify issuer manually until it is properly configured.
# See https://github.com/openedx/edx-drf-extensions/issues/327 for removing this manual issuer validation.
token_issuer = decoded_token.get('iss')
# .. custom_attribute_name: jwt_auth_issuer
# .. custom_attribute_description: Value set to the JWT auth issuer.
Expand Down

0 comments on commit ae6b4ee

Please sign in to comment.