| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add `as_dict` option to `Algorithm.to_jwt`
* Update unit tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixup! Add `as_dict` option to `Algorithm.to_jwt`
* fixup! Add `as_dict` option to `Algorithm.to_jwt`
* fixup! Update unit tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix type errors
* Fix tox test errors
* Fix typing for Python 3.7
* Add OKP jwk tests
* Add `pragma: no cover` to method overloads
* Add pragma: no cover to exclude lines
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Tim Waterson <tim.waterson@risilience.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.1.1...v1.2.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use new style typing
* Fix type annotations to allow all keys
* Use string type annotations where required
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove outdated comment
* Ignore `if TYPE_CHECKING:` lines in coverage
* Remove duplicate test
* Fix mypy errors
* Update algorithms.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fully switch to modern annotations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update `pre-commit` mypy config
* Use Python 3.11 for mypy
* Update mypy Python version in `pyproject.toml`
* Few tests mypy fixes
* fix mypy errors on tests
* Fix key imports
* Remove unused import
* Fix randomly failing test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
|
|
|
|
|
|
| |
This change adds a new `PyJWKClientConnectionError` exception which
helps to differentiate connection errors from other types of failures
when calling methods such as `get_signing_key_from_jwt()`. This allows
users to do things like retry the method if there's a connection issue.
|
|
|
|
|
|
|
|
|
| |
By default, the timeout for urlopen is socket._GLOBAL_DEFAULT_TIMEOUT
which is None (meaning that the request never times out):
https://docs.python.org/3/library/socket.html#socket.getdefaulttimeout
This change sets the timeout to 30 but also adds a timeout variable
users can set.
|
|
|
|
|
|
| |
updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.1.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.1.1)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Make `Algorithm` an abstract base class
This also removes some tests that are not relevant anymore
Raise `NotImplementedError` for `NoneAlgorithm`
* Use `hasattr` instead of `getattr`
* Only allow `dict` in `encode`
|
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v0.991 → v1.0.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.991...v1.0.1)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [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>
|
|
|
|
|
|
|
| |
updates:
- [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0)
- [github.com/PyCQA/isort: 5.11.4 → 5.12.0](https://github.com/PyCQA/isort/compare/5.11.4...5.12.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
* Fix `_validate_iat` validation
* Add test and update changelog
|
|
|
|
|
| |
* Differentiate between two errors
* #809 mention in the changelog
|
|
|
|
|
|
|
| |
* Add return types in `JWKSetCache`
* Add types for hash algorithms
* Add missing type annotation in `ECAlgorithm`
|
|
|
|
|
|
|
| |
updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
- [github.com/PyCQA/isort: 5.10.1 → 5.11.4](https://github.com/PyCQA/isort/compare/5.10.1...5.11.4)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add `sort_headers` parameter to `api_jwt.encode`
This allows you to not sort headers, which prevents a breaking change between v2.4.0 and v2.5.0
* Add `test_sorting_headers` test
* Remove outdated comment about misordered headers
* Explicity assert sorting in `test_sorting_of_headers`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Parametrize `test_sorting_of_headers`
* Use normal dict in `test_sorting_of_headers`
* fixup! Use normal dict in `test_sorting_of_headers`
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
| |
* Add PyJWT._decode_payload hook
* Add PyJWT._encode_payload hook
|
|
|
|
|
|
| |
updates:
- [github.com/mgedmin/check-manifest: 0.48 → 0.49](https://github.com/mgedmin/check-manifest/compare/0.48...0.49)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
| |
updates:
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v0.990 → v0.991](https://github.com/pre-commit/mirrors-mypy/compare/v0.990...v0.991)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* allow configuration of custom headers in JWKClient
* revert changes to algorithms
* document example usage of custom headers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* black format tests
* Add a release note for optional headers arg
Co-authored-by: thundercat1 <michael.haines@recursionpharma.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
| |
updates:
- [github.com/pre-commit/mirrors-mypy: v0.982 → v0.990](https://github.com/pre-commit/mirrors-mypy/compare/v0.982...v0.990)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
| |
Fixes #814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
validation example (#775)
* Add compute_hash_digest to Algorithm objects
`Algorithm.compute_hash_digest` is defined as a method which inspects
the object to see that it has the requisite attributes, `hash_alg`.
If `hash_alg` is not set, then the method raises a
NotImplementedError. This applies to classes like NoneAlgorithm.
If `hash_alg` is set, then it is checked for
```
has_crypto # is cryptography available?
and isinstance(hash_alg, type)
and issubclass(hash_alg, hashes.HashAlgorithm)
```
to see which API for computing a digest is appropriate --
`hashlib` vs `cryptography.hazmat.primitives.hashes`.
These checks could be avoided at runtime if it were necessary to
optimize further (e.g. attach compute_hash_digest methods to classes
with a class decorator) but this is not clearly a worthwhile
optimization. Such perf tuning is intentionally omitted for now.
* Add doc example of OIDC login flow
The goal of this doc example is to demonstrate usage of
`get_algorithm_by_name` and `compute_hash_digest` for the purpose of
`at_hash` validation. It is not meant to be a "guaranteed correct" and
spec-compliant example.
closes #314
|
|
|
|
|
| |
* Add classifier for Python 3.11
* Add classifier for Python 3.11
|
|
|
| |
Co-authored-by: José Padilla <jpadilla@users.noreply.github.com>
|
|
|
|
|
|
|
| |
updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/pre-commit/mirrors-mypy: v0.971 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v0.982)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
| |
* Handling 'ImmatureSignatureError' for issued_at time when it is a future time
* adding changelog and test cases
|
|
|
|
|
| |
* Invalidate exp when exp == now()
* Update changelog
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
| |
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: José Padilla <jpadilla@users.noreply.github.com>
|
|
|
|
|
|
|
| |
This is not needed for using the project with `cryptography`. Also, the
typing information is incorrect or incomplete for the latest version of
`cryptography`.
Fixes #804
|
| |
|
|
|
| |
Co-authored-by: José Padilla <jpadilla@users.noreply.github.com>
|
|
|
|
|
|
| |
updates:
- [github.com/PyCQA/flake8: 5.0.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/5.0.2...5.0.4)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
* feat(mypy): from tox to pre-commit
* fix(mypy): apply mypy fixes
* feat(api_jws): typing
Co-authored-by: JulianMaurin <julian.maurin@backmarket.com>
|