diff --git a/edx_rest_framework_extensions/auth/jwt/decoder.py b/edx_rest_framework_extensions/auth/jwt/decoder.py index c6c146dd..cdcd4bbe 100644 --- a/edx_rest_framework_extensions/auth/jwt/decoder.py +++ b/edx_rest_framework_extensions/auth/jwt/decoder.py @@ -251,7 +251,14 @@ def _verify_jwt_signature(token, jwt_issuer, decode_symmetric_token): def verify_jwk_signature_using_keyset(token, key_set, aud=None, iss=None, verify_signature=True, verify_exp=True): - + """ + Verifies the JWS using the provided keyset. + It loops through the available keys in the keyset + to find that if there is any key which can be used to verify + the signature. + The audience and issuer arguments will be verified if they are passed + while calling the method. + """ options = { 'verify_signature': verify_signature, 'verify_exp': verify_exp, diff --git a/tox.ini b/tox.ini index 9970596c..90be34ac 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = drf312: djangorestframework>=3.12,<3.13 drflatest: djangorestframework commands = - python -Wd coverage -m pytest {posargs} + python -m pytest --cov {posargs} coverage report [testenv:quality]