Currently, actual behavior does not match the docs.
For Validation's field aud it says: "If it contains a value, the validation will check that the aud claim value is in the values provided.". Reading this, I assume that it will skip validation of aud claim if this option is None
But in reality, it will fail for any token if the aud is None (because of validation logic inside jsonwebtoken crate)
This PR fixes it by setting an appropriate option validate_aud for validation options of jsonwebtoken
Currently, actual behavior does not match the docs.
For
Validation
's fieldaud
it says: "If it contains a value, the validation will check that theaud
claim value is in the values provided.". Reading this, I assume that it will skip validation ofaud
claim if this option isNone
But in reality, it will fail for any token if the
aud
isNone
(because of validation logic insidejsonwebtoken
crate)This PR fixes it by setting an appropriate option
validate_aud
for validation options ofjsonwebtoken