summaryrefslogtreecommitdiff
path: root/tests/test_api_jwk.py
Commit message (Collapse)AuthorAgeFilesLines
* [pre-commit.ci] pre-commit autoupdate (#855)pre-commit-ci[bot]2023-02-071-10/+0
| | | | | | | | | | | | | | * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Improve error messages when cryptography isn't installed (#846)Viicos2023-01-261-1/+7
| | | | | | | | | | | * Improve error messages when cryptography isn't installed * Add test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Make mypy configuration stricter and improve typing (#830)Aarni Koskela2022-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PyJWS._verify_signature: raise early KeyError if header is missing alg * Make Mypy configuration stricter * Improve typing in jwt.utils * Improve typing in jwt.help * Improve typing in jwt.exceptions * Improve typing in jwt.api_jwk * Improve typing in jwt.api_jws * Improve typing & clean up imports in jwt.algorithms * Correct JWS.decode rettype to any (payload could be something else) * Update typing in api_jwt * Improve typing in jwks_client * Improve typing in docs/conf.py * Fix (benign) mistyping in test_advisory * Fix misc type complaints in tests
* Improve PyJWKSet error accuracy (#786)Julian Maurin2022-08-011-4/+11
| | | | | | | | | * refacto(TestPyJWKSet): crypto_required decorator at the class level * refacto(TestPyJWKSet): add test to validate the constructor behaviour * fix(PyJWKSet): improve error accuracy Co-authored-by: JulianMaurin <julian.maurin@backmarket.com>
* Do not fail when an unusable key occurs (#762)Matthias Gilch2022-05-311-2/+20
| | | | | | | | | | | | | | | | | | | * Do not fail when a unusable key occurs There may be more than keys in the store which may be (still usable). Therefore we do not want to fail on any key that is not usable by pyjwt, but rather skip when appending to the KeySet * Add test cases with unusable 'alg' keys * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add 'skip keys' to changelog * Update CHANGELOG.rst Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* api_jwk: Add PyJWKSet.__getitem__ (#725)William Woodruff2022-01-251-0/+23
| | | | | | | * api_jwk: Add PyJWKSet.__getitem__ Closes #724. * CHANGELOG: record changes
* Add support for Ed448/EdDSA. (#675)Ajitomi, Daisuke2021-10-031-7/+2
| | | | | * Add support for Ed448/EdDSA. * Add test for verification using EdDSA private key.
* Support JWK without alg. (#624)Ajitomi, Daisuke2021-03-221-1/+161
| | | | | | | | | | | * Support JWK without alg. * Make kty mandatory on PyJWK. * Add tests for kty=OKP. * Add tests for OKP-type JWK. * Add support for ES256K.
* Prefer ModuleNotFoundError over ImportError (#565)Jon Dufresne2020-12-211-3/+2
| | | | | | | | | | | ModuleNotFoundError was introduced in Python 3. It is raised when the module does not exist. On the other hand, ImportError is raised during any import failure. For example, a syntax error or other runtime error. Using ModuleNotFoundError means that errors unrelated to a missing package will be propagated to the user. PyJWT doesn't know how to handle these. This also allows more functions to always be available for import
* Add utility functions to assist test skipping (#563)Jon Dufresne2020-12-191-22/+6
|
* Run pyupgrade to simplify code and use Python 3.6 syntax (#536)Jon Dufresne2020-12-161-4/+4
| | | | | | | | | | | | | | pyugrade is a command line tool to automatically update Python syntax to modern usage and patterns. For additional details, see: https://github.com/asottile/pyupgrade Changes made by the tool: - Use short Python3 super() syntax. - Use f-strings when they are simple and more readable. - Drop Python 2 u prefix from strings. - Drop "r" argument from open(). It is the default and so specifying it is unnecessary.
* Introduce better experience for JWKs (#511)José Padilla2020-08-241-0/+116
* Introduce better experience for JWKs * Remove explicit inheritance * Add tests for PyJWK * Fix failing test * Get rid of lambda