pyjwt icon indicating copy to clipboard operation
pyjwt copied to clipboard

Fixes #964: Validate key against allowed types for Algorithm family

Open pachewise opened this issue 5 months ago • 0 comments

  • [ ] add tests, make sure current test suite passes
  • [ ] remove TODOs

Following discussion in #964, this PR adds checks to make sure the key loaded by any of the has_crypto = True Algorithm children is of the correct type for that Algorithm family. I still need to figure out how to check whether it's the right "flavor" of the algo family (for example, that the SHA256 algo is encoding/decoding using a key generated via SHA256).

pachewise avatar Sep 12 '24 20:09 pachewise