actinia-core
actinia-core copied to clipboard
replace deprecated (Timed)JSONWebSignatureSerializer
Fixes #345
This PR proposes to use jwt instead of itsdangerous to 1) no longer use a deprecated component, 2) solve python lib conflicts with the actinia-stac plugin. (Timed)JSONWebSignatureSerializer uses by default HS512 as hash algorithm, therefore this PR also uses this algorithm with jwt, in the hope that existing API keys are still recognized as valid keys.
Test failure:
/src/actinia_core/tests/test_login.py:307: AssertionError: 400 != 200 : HTML status code is wrong 400
The AttributeError: module 'jwt' has no attribute 'decode'
is strange because of
https://pyjwt.readthedocs.io/en/stable/api.html#jwt.decode
Same for AttributeError: module 'jwt.exceptions' has no attribute 'DecodeError'
Which version of PyJWT are you using?
This is even more strange because all PR tests are passed.
Sorry, I installed the wrong module :see_no_evil: With the correct one, everything works fine, so sorry for the noise.
Really cool, that we can keep this funtionality. @anikaweinmann does this interfere in any way with the keycloak implementation? And I am not sure if it is backwards-compatible. Therefore it might make sense to make a major version update? What do you think?
I moved maybe some parts in a base class, but does not change things in the functions. I am also not sure if it is backwards-compatible.