You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a simple bug in the codebase due to which a few algorithms depending on the crypto module, when applied, result in errors like Unrecognised algorithm type: 'EdDSA', even though they are technically supported by crypto module.
Why does this happen?
In backends.py, there is a list of ALLOWED_ALGORITHMS:
_("You must have cryptography installed to use {}."), algorithm
)
)
EdDSA is not in the list. It is, however, available in the algorithms.requires_cryptography list (in the function above) or the jwt.requires_cryptography
Proposal:
Expand the list to support algorithms supported by crypto. I was able to make EdDSA work in my project by simply updating this list.
The text was updated successfully, but these errors were encountered:
Problem:
There is a simple bug in the codebase due to which a few algorithms depending on the
crypto
module, when applied, result in errors likeUnrecognised algorithm type: 'EdDSA'
, even though they are technically supported bycrypto
module.Why does this happen?
In backends.py, there is a list of
ALLOWED_ALGORITHMS
:djangorestframework-simplejwt/rest_framework_simplejwt/backends.py
Lines 21 to 33 in d66d246
The issue is that this is the only list used for validation in the first check below:
djangorestframework-simplejwt/rest_framework_simplejwt/backends.py
Lines 62 to 77 in d66d246
EdDSA is not in the list. It is, however, available in the
algorithms.requires_cryptography
list (in the function above) or thejwt.requires_cryptography
Proposal:
Expand the list to support algorithms supported by crypto. I was able to make
EdDSA
work in my project by simply updating this list.The text was updated successfully, but these errors were encountered: