-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more types #843
Add more types #843
Conversation
I have an interesting issue with mypy, now that jwt/algorithms.py:592: error: Argument "salt_length" to "PSS" has incompatible type "Callable[[HashAlgorithm], int]"; expected "Union[int, _MaxLength, _Auto, _DigestLength]" [arg-type]
jwt/algorithms.py:604: error: Argument "salt_length" to "PSS" has incompatible type "Callable[[HashAlgorithm], int]"; expected "Union[int, _MaxLength, _Auto, _DigestLength]" [arg-type] This is due to the fact that Lines 589 to 592 in 701e8d9
And because class HashAlgorithm(metaclass=abc.ABCMeta):
@abc.abstractproperty
def name(self) -> str:
"""
A string naming this algorithm (e.g. "sha256", "md5").
"""
@abc.abstractproperty
def digest_size(self) -> int:
"""
The size of the resulting digest in bytes.
"""
@abc.abstractproperty
def block_size(self) -> typing.Optional[int]:
"""
The internal block size of the hash function, or None if the hash
function does not use blocks internally (e.g. SHA3).
""" class SHA256(HashAlgorithm):
name = "sha256"
digest_size = 32
block_size = 64 So this still works at runtime, but I think this is something that should be sorted out in the |
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.6.0 to 2.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/releases">pyjwt's releases</a>.</em></p> <blockquote> <h2>2.7.0</h2> <h2>What's Changed</h2> <ul> <li>Add classifier for Python 3.11 by <a href="https://github.com/eseifert"><code>@eseifert</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li>Add <code>Algorithm.compute_hash_digest</code> and use it to implement at_hash validation example by <a href="https://github.com/sirosen"><code>@sirosen</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/775">jpadilla/pyjwt#775</a></li> <li>fix: use datetime.datetime.timestamp function to have a milliseconds by <a href="https://github.com/daillouf"><code>@daillouf</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/825">jpadilla/pyjwt#825</a></li> <li>Custom header configuration in jwk client by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/828">jpadilla/pyjwt#828</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/833">jpadilla/pyjwt#833</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/835">jpadilla/pyjwt#835</a></li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/829">jpadilla/pyjwt#829</a></li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/830">jpadilla/pyjwt#830</a></li> <li>Bump actions/stale from 6 to 7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/840">jpadilla/pyjwt#840</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/838">jpadilla/pyjwt#838</a></li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li>Differentiate between two errors by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li>Fix <code>_validate_iat</code> validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/847">jpadilla/pyjwt#847</a></li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/846">jpadilla/pyjwt#846</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/852">jpadilla/pyjwt#852</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/855">jpadilla/pyjwt#855</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/859">jpadilla/pyjwt#859</a></li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/845">jpadilla/pyjwt#845</a></li> <li>docs: correct mistake in the changelog about verify param by <a href="https://github.com/gbillig"><code>@gbillig</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/868">jpadilla/pyjwt#868</a></li> <li>Bump actions/stale from 7 to 8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/872">jpadilla/pyjwt#872</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/874">jpadilla/pyjwt#874</a></li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/876">jpadilla/pyjwt#876</a></li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/873">jpadilla/pyjwt#873</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/878">jpadilla/pyjwt#878</a></li> <li>Build and upload PyPI package by <a href="https://github.com/jpadilla"><code>@jpadilla</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/884">jpadilla/pyjwt#884</a></li> <li>Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/eseifert"><code>@eseifert</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li><a href="https://github.com/daillouf"><code>@daillouf</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li><a href="https://github.com/thundercat1"><code>@thundercat1</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li><a href="https://github.com/evroon"><code>@evroon</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li><a href="https://github.com/Viicos"><code>@Viicos</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li><a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li><a href="https://github.com/gbillig"><code>@gbillig</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li><a href="https://github.com/daviddavis"><code>@daviddavis</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li><a href="https://github.com/timw6n"><code>@timw6n</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li><a href="https://github.com/fluxth"><code>@fluxth</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0">https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst">pyjwt's changelog</a>.</em></p> <blockquote> <h2><code>v2.7.0 <https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0></code>__</h2> <p>Changed</p> <pre><code> - Changed the error message when the token audience doesn't match the expected audience by @irdkwmnsb `[#809](jpadilla/pyjwt#809) <https://github.com/jpadilla/pyjwt/pull/809>`__ - Improve error messages when cryptography isn't installed by @Viicos in `[#846](jpadilla/pyjwt#846) <https://github.com/jpadilla/pyjwt/pull/846>`__ - Make `Algorithm` an abstract base class by @Viicos in `[#845](jpadilla/pyjwt#845) <https://github.com/jpadilla/pyjwt/pull/845>`__ - ignore invalid keys in a jwks by @timw6n in `[#863](jpadilla/pyjwt#863) <https://github.com/jpadilla/pyjwt/pull/863>`__ <p>Fixed</p> <pre><code> - Add classifier for Python 3.11 by @eseifert in `[#818](jpadilla/pyjwt#818) &lt;https://github.com/jpadilla/pyjwt/pull/818&gt;`__ - Fix ``_validate_iat`` validation by @Viicos in `[#847](jpadilla/pyjwt#847) &lt;https://github.com/jpadilla/pyjwt/pull/847&gt;`__ - fix: use datetime.datetime.timestamp function to have a milliseconds by @daillouf `[#821](jpadilla/pyjwt#821) &lt;https://github.com/jpadilla/pyjwt/pull/821&gt;`__ - docs: correct mistake in the changelog about verify param by @gbillig in `[#866](jpadilla/pyjwt#866) &lt;https://github.com/jpadilla/pyjwt/pull/866&gt;`__ Added </code></pre> <ul> <li>Add <code>compute_hash_digest</code> as a method of <code>Algorithm</code> objects, which uses the underlying hash algorithm to compute a digest. If there is no appropriate hash algorithm, a <code>NotImplementedError</code> will be raised in <code>[#775](jpadilla/pyjwt#775) &lt;https://github.com/jpadilla/pyjwt/pull/775&gt;</code>__</li> <li>Add optional <code>headers</code> argument to <code>PyJWKClient</code>. If provided, the headers will be included in requests that the client uses when fetching the JWK set by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <code>[#823](jpadilla/pyjwt#823) &lt;https://github.com/jpadilla/pyjwt/pull/823&gt;</code>__</li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#829](jpadilla/pyjwt#829) &lt;https://github.com/jpadilla/pyjwt/pull/829&gt;</code>__</li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <code>[#832](jpadilla/pyjwt#832) &lt;https://github.com/jpadilla/pyjwt/pull/832&gt;</code>__</li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#830](jpadilla/pyjwt#830) &lt;https://github.com/jpadilla/pyjwt/pull/830&gt;</code>__</li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#843](jpadilla/pyjwt#843) &lt;https://github.com/jpadilla/pyjwt/pull/843&gt;</code>__</li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#875](jpadilla/pyjwt#875) &lt;https://github.com/jpadilla/pyjwt/pull/875&gt;</code>__</li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#876](jpadilla/pyjwt#876) &lt;https://github.com/jpadilla/pyjwt/pull/876&gt;</code>__</li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#873](jpadilla/pyjwt#873) &lt;https://github.com/jpadilla/pyjwt/pull/873&gt;</code>__</li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <code>[#881](jpadilla/pyjwt#881) &lt;https://github.com/jpadilla/pyjwt/pull/881&gt;</code>__ </code></pre></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/d7c54dbebdab2ae17f7948fd4432b15e1bb82852"><code>d7c54db</code></a> chore: update readme</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/c35e59b9f2c0bc0cf1a71b440a115d997f1e0535"><code>c35e59b</code></a> Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/881">#881</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6a273419949b68ddccbe3867fd4bd8680cacf097"><code>6a27341</code></a> Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/863">#863</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/abeeacb99a30a5c2ae60c1696bb7ead012405349"><code>abeeacb</code></a> bump up version to 2.7.0</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/d8b12421654840418fd25b86553795c0c09ed0a9"><code>d8b1242</code></a> Update pypi-package.yml</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6d1c3d341af3378653af3653436bd9ff411e5e63"><code>6d1c3d3</code></a> Update pypi-package.yml</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/81b9ef4888fc75f8a3b7224f15eb8b18146f4b44"><code>81b9ef4</code></a> Create pypi-package.yml (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/884">#884</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/97711b1a4fc322796092faa6bb18f8097b8eed62"><code>97711b1</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/878">#878</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/56b3d5633160e79e1f4c5c09023d68759cbf84a6"><code>56b3d56</code></a> Add complete types to take all allowed keys into account (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/873">#873</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/ba726444a6cee75af59feb8ea08294d0ac89bedb"><code>ba72644</code></a> Add client connection error exception (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/876">#876</a>)</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyjwt&package-manager=pip&previous-version=2.6.0&new-version=2.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.6.0 to 2.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/releases">pyjwt's releases</a>.</em></p> <blockquote> <h2>2.7.0</h2> <h2>What's Changed</h2> <ul> <li>Add classifier for Python 3.11 by <a href="https://github.com/eseifert"><code>@eseifert</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li>Add <code>Algorithm.compute_hash_digest</code> and use it to implement at_hash validation example by <a href="https://github.com/sirosen"><code>@sirosen</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/775">jpadilla/pyjwt#775</a></li> <li>fix: use datetime.datetime.timestamp function to have a milliseconds by <a href="https://github.com/daillouf"><code>@daillouf</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/825">jpadilla/pyjwt#825</a></li> <li>Custom header configuration in jwk client by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/828">jpadilla/pyjwt#828</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/833">jpadilla/pyjwt#833</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/835">jpadilla/pyjwt#835</a></li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/829">jpadilla/pyjwt#829</a></li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/830">jpadilla/pyjwt#830</a></li> <li>Bump actions/stale from 6 to 7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/840">jpadilla/pyjwt#840</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/838">jpadilla/pyjwt#838</a></li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li>Differentiate between two errors by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li>Fix <code>_validate_iat</code> validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/847">jpadilla/pyjwt#847</a></li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/846">jpadilla/pyjwt#846</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/852">jpadilla/pyjwt#852</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/855">jpadilla/pyjwt#855</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/859">jpadilla/pyjwt#859</a></li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/845">jpadilla/pyjwt#845</a></li> <li>docs: correct mistake in the changelog about verify param by <a href="https://github.com/gbillig"><code>@gbillig</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/868">jpadilla/pyjwt#868</a></li> <li>Bump actions/stale from 7 to 8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/872">jpadilla/pyjwt#872</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/874">jpadilla/pyjwt#874</a></li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/876">jpadilla/pyjwt#876</a></li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/873">jpadilla/pyjwt#873</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/878">jpadilla/pyjwt#878</a></li> <li>Build and upload PyPI package by <a href="https://github.com/jpadilla"><code>@jpadilla</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/884">jpadilla/pyjwt#884</a></li> <li>Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/eseifert"><code>@eseifert</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li><a href="https://github.com/daillouf"><code>@daillouf</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li><a href="https://github.com/thundercat1"><code>@thundercat1</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li><a href="https://github.com/evroon"><code>@evroon</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li><a href="https://github.com/Viicos"><code>@Viicos</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li><a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li><a href="https://github.com/gbillig"><code>@gbillig</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li><a href="https://github.com/daviddavis"><code>@daviddavis</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li><a href="https://github.com/timw6n"><code>@timw6n</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li><a href="https://github.com/fluxth"><code>@fluxth</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0">https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst">pyjwt's changelog</a>.</em></p> <blockquote> <h2><code>v2.7.0 <https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0></code>__</h2> <p>Changed</p> <pre><code> - Changed the error message when the token audience doesn't match the expected audience by @irdkwmnsb `[#809](jpadilla/pyjwt#809) <https://github.com/jpadilla/pyjwt/pull/809>`__ - Improve error messages when cryptography isn't installed by @Viicos in `[#846](jpadilla/pyjwt#846) <https://github.com/jpadilla/pyjwt/pull/846>`__ - Make `Algorithm` an abstract base class by @Viicos in `[#845](jpadilla/pyjwt#845) <https://github.com/jpadilla/pyjwt/pull/845>`__ - ignore invalid keys in a jwks by @timw6n in `[#863](jpadilla/pyjwt#863) <https://github.com/jpadilla/pyjwt/pull/863>`__ <p>Fixed</p> <pre><code> - Add classifier for Python 3.11 by @eseifert in `[#818](jpadilla/pyjwt#818) &lt;https://github.com/jpadilla/pyjwt/pull/818&gt;`__ - Fix ``_validate_iat`` validation by @Viicos in `[#847](jpadilla/pyjwt#847) &lt;https://github.com/jpadilla/pyjwt/pull/847&gt;`__ - fix: use datetime.datetime.timestamp function to have a milliseconds by @daillouf `[#821](jpadilla/pyjwt#821) &lt;https://github.com/jpadilla/pyjwt/pull/821&gt;`__ - docs: correct mistake in the changelog about verify param by @gbillig in `[#866](jpadilla/pyjwt#866) &lt;https://github.com/jpadilla/pyjwt/pull/866&gt;`__ Added </code></pre> <ul> <li>Add <code>compute_hash_digest</code> as a method of <code>Algorithm</code> objects, which uses the underlying hash algorithm to compute a digest. If there is no appropriate hash algorithm, a <code>NotImplementedError</code> will be raised in <code>[#775](jpadilla/pyjwt#775) &lt;https://github.com/jpadilla/pyjwt/pull/775&gt;</code>__</li> <li>Add optional <code>headers</code> argument to <code>PyJWKClient</code>. If provided, the headers will be included in requests that the client uses when fetching the JWK set by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <code>[#823](jpadilla/pyjwt#823) &lt;https://github.com/jpadilla/pyjwt/pull/823&gt;</code>__</li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#829](jpadilla/pyjwt#829) &lt;https://github.com/jpadilla/pyjwt/pull/829&gt;</code>__</li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <code>[#832](jpadilla/pyjwt#832) &lt;https://github.com/jpadilla/pyjwt/pull/832&gt;</code>__</li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#830](jpadilla/pyjwt#830) &lt;https://github.com/jpadilla/pyjwt/pull/830&gt;</code>__</li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#843](jpadilla/pyjwt#843) &lt;https://github.com/jpadilla/pyjwt/pull/843&gt;</code>__</li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#875](jpadilla/pyjwt#875) &lt;https://github.com/jpadilla/pyjwt/pull/875&gt;</code>__</li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#876](jpadilla/pyjwt#876) &lt;https://github.com/jpadilla/pyjwt/pull/876&gt;</code>__</li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#873](jpadilla/pyjwt#873) &lt;https://github.com/jpadilla/pyjwt/pull/873&gt;</code>__</li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <code>[#881](jpadilla/pyjwt#881) &lt;https://github.com/jpadilla/pyjwt/pull/881&gt;</code>__ </code></pre></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/d7c54dbebdab2ae17f7948fd4432b15e1bb82852"><code>d7c54db</code></a> chore: update readme</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/c35e59b9f2c0bc0cf1a71b440a115d997f1e0535"><code>c35e59b</code></a> Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/881">#881</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6a273419949b68ddccbe3867fd4bd8680cacf097"><code>6a27341</code></a> Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/863">#863</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/abeeacb99a30a5c2ae60c1696bb7ead012405349"><code>abeeacb</code></a> bump up version to 2.7.0</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/d8b12421654840418fd25b86553795c0c09ed0a9"><code>d8b1242</code></a> Update pypi-package.yml</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6d1c3d341af3378653af3653436bd9ff411e5e63"><code>6d1c3d3</code></a> Update pypi-package.yml</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/81b9ef4888fc75f8a3b7224f15eb8b18146f4b44"><code>81b9ef4</code></a> Create pypi-package.yml (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/884">#884</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/97711b1a4fc322796092faa6bb18f8097b8eed62"><code>97711b1</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/878">#878</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/56b3d5633160e79e1f4c5c09023d68759cbf84a6"><code>56b3d56</code></a> Add complete types to take all allowed keys into account (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/873">#873</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/ba726444a6cee75af59feb8ea08294d0ac89bedb"><code>ba72644</code></a> Add client connection error exception (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/876">#876</a>)</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyjwt&package-manager=pip&previous-version=2.6.0&new-version=2.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.0.1 to 2.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/releases">pyjwt's releases</a>.</em></p> <blockquote> <h2>2.8.0</h2> <h2>What's Changed</h2> <ul> <li>Export PyJWKClientConnectionError class by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/887">jpadilla/pyjwt#887</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/889">jpadilla/pyjwt#889</a></li> <li>Patch 1 by <a href="https://github.com/juur"><code>@juur</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/891">jpadilla/pyjwt#891</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/896">jpadilla/pyjwt#896</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/898">jpadilla/pyjwt#898</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/900">jpadilla/pyjwt#900</a></li> <li>Update python version by <a href="https://github.com/auvipy"><code>@auvipy</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/895">jpadilla/pyjwt#895</a></li> <li>api_jwt: add a <code>strict_aud</code> option by <a href="https://github.com/woodruffw"><code>@woodruffw</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/902">jpadilla/pyjwt#902</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/juur"><code>@juur</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/891">jpadilla/pyjwt#891</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0">https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0</a></p> <h2>2.7.0</h2> <h2>What's Changed</h2> <ul> <li>Add classifier for Python 3.11 by <a href="https://github.com/eseifert"><code>@eseifert</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li>Add <code>Algorithm.compute_hash_digest</code> and use it to implement at_hash validation example by <a href="https://github.com/sirosen"><code>@sirosen</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/775">jpadilla/pyjwt#775</a></li> <li>fix: use datetime.datetime.timestamp function to have a milliseconds by <a href="https://github.com/daillouf"><code>@daillouf</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/825">jpadilla/pyjwt#825</a></li> <li>Custom header configuration in jwk client by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/828">jpadilla/pyjwt#828</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/833">jpadilla/pyjwt#833</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/835">jpadilla/pyjwt#835</a></li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/829">jpadilla/pyjwt#829</a></li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/830">jpadilla/pyjwt#830</a></li> <li>Bump actions/stale from 6 to 7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/840">jpadilla/pyjwt#840</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/838">jpadilla/pyjwt#838</a></li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li>Differentiate between two errors by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li>Fix <code>_validate_iat</code> validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/847">jpadilla/pyjwt#847</a></li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/846">jpadilla/pyjwt#846</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/852">jpadilla/pyjwt#852</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/855">jpadilla/pyjwt#855</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/859">jpadilla/pyjwt#859</a></li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/845">jpadilla/pyjwt#845</a></li> <li>docs: correct mistake in the changelog about verify param by <a href="https://github.com/gbillig"><code>@gbillig</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/868">jpadilla/pyjwt#868</a></li> <li>Bump actions/stale from 7 to 8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/872">jpadilla/pyjwt#872</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/874">jpadilla/pyjwt#874</a></li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/876">jpadilla/pyjwt#876</a></li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/873">jpadilla/pyjwt#873</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/878">jpadilla/pyjwt#878</a></li> <li>Build and upload PyPI package by <a href="https://github.com/jpadilla"><code>@jpadilla</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/884">jpadilla/pyjwt#884</a></li> <li>Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst">pyjwt's changelog</a>.</em></p> <blockquote> <h2><code>v2.8.0 <https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0></code>__</h2> <p>Changed</p> <pre><code> - Update python version test matrix by @auvipy in `[#895](jpadilla/pyjwt#895) <https://github.com/jpadilla/pyjwt/pull/895>`__ <p>Fixed</p> <pre><code> Added </code></pre> <ul> <li>Add <code>strict_aud</code> as an option to <code>jwt.decode</code> by <a href="https://github.com/woodruffw"><code>@woodruffw</code></a> in <code>[#902](jpadilla/pyjwt#902) &lt;https://github.com/jpadilla/pyjwt/pull/902&gt;</code>__</li> <li>Export PyJWKClientConnectionError class by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#887](jpadilla/pyjwt#887) &lt;https://github.com/jpadilla/pyjwt/pull/887&gt;</code>__</li> <li>Allows passing of ssl.SSLContext to PyJWKClient by <a href="https://github.com/juur"><code>@juur</code></a> in <code>[#891](jpadilla/pyjwt#891) &lt;https://github.com/jpadilla/pyjwt/pull/891&gt;</code>__</li> </ul> <h2><code>v2.7.0 &lt;https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0&gt;</code>__</h2> <p>Changed </code></pre></p> <ul> <li>Changed the error message when the token audience doesn't match the expected audience by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> <code>[#809](jpadilla/pyjwt#809) <https://github.com/jpadilla/pyjwt/pull/809></code>__</li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#846](jpadilla/pyjwt#846) <https://github.com/jpadilla/pyjwt/pull/846></code>__</li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#845](jpadilla/pyjwt#845) <https://github.com/jpadilla/pyjwt/pull/845></code>__</li> <li>ignore invalid keys in a jwks by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <code>[#863](jpadilla/pyjwt#863) <https://github.com/jpadilla/pyjwt/pull/863></code>__</li> </ul> <p>Fixed</p> <pre><code> - Add classifier for Python 3.11 by @eseifert in `[#818](jpadilla/pyjwt#818) <https://github.com/jpadilla/pyjwt/pull/818>`__ - Fix ``_validate_iat`` validation by @Viicos in `[#847](jpadilla/pyjwt#847) <https://github.com/jpadilla/pyjwt/pull/847>`__ - fix: use datetime.datetime.timestamp function to have a milliseconds by @daillouf `[#821](jpadilla/pyjwt#821) <https://github.com/jpadilla/pyjwt/pull/821>`__ - docs: correct mistake in the changelog about verify param by @gbillig in `[#866](jpadilla/pyjwt#866) <https://github.com/jpadilla/pyjwt/pull/866>`__ <p>Added </code></pre></p> <ul> <li>Add <code>compute_hash_digest</code> as a method of <code>Algorithm</code> objects, which uses the underlying hash algorithm to compute a digest. If there is no appropriate hash algorithm, a <code>NotImplementedError</code> will be raised in <code>[#775](jpadilla/pyjwt#775) <https://github.com/jpadilla/pyjwt/pull/775></code>__</li> <li>Add optional <code>headers</code> argument to <code>PyJWKClient</code>. If provided, the headers will be included in requests that the client uses when fetching the JWK set by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <code>[#823](jpadilla/pyjwt#823) <https://github.com/jpadilla/pyjwt/pull/823></code>__</li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#829](jpadilla/pyjwt#829) <https://github.com/jpadilla/pyjwt/pull/829></code>__</li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <code>[#832](jpadilla/pyjwt#832) <https://github.com/jpadilla/pyjwt/pull/832></code>__</li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#830](jpadilla/pyjwt#830) <https://github.com/jpadilla/pyjwt/pull/830></code>__</li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#843](jpadilla/pyjwt#843) <https://github.com/jpadilla/pyjwt/pull/843></code>__</li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#875](jpadilla/pyjwt#875) <https://github.com/jpadilla/pyjwt/pull/875></code>__</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/72ad55f6d7041ae698dc0790a690804118be50fc"><code>72ad55f</code></a> bump version</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/22ba13287874a7a22748b451c7d84f12b2f8ccab"><code>22ba132</code></a> api_jwt: add a <code>strict_aud</code> option (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/902">#902</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6db5df72d031bd49f8a25e84ccf4ec91b2d6af3b"><code>6db5df7</code></a> Update python version (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/895">#895</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6e7027684c37218786c1526c6790a57720602fa9"><code>6e70276</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/900">#900</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/ea351558128d726ead5502409a6a14dc05119578"><code>ea35155</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/898">#898</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/faeae6e54312f9827f369d185f60e99579338309"><code>faeae6e</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/896">#896</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6cef6f28fa63f2bb01d22ff03868409da24373fd"><code>6cef6f2</code></a> Patch 1 (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/891">#891</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/7f07d50b41d21cb476bf81853257f9f9fedae3bc"><code>7f07d50</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/889">#889</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/1c272817a217c03534feb98004f3f6bd10512e07"><code>1c27281</code></a> Export PyJWKClientConnectionError class (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/887">#887</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/d7c54dbebdab2ae17f7948fd4432b15e1bb82852"><code>d7c54db</code></a> chore: update readme</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.0.1...2.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyjwt&package-manager=pip&previous-version=2.0.1&new-version=2.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.6.0 to 2.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/releases">pyjwt's releases</a>.</em></p> <blockquote> <h2>2.8.0</h2> <h2>What's Changed</h2> <ul> <li>Export PyJWKClientConnectionError class by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/887">jpadilla/pyjwt#887</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/889">jpadilla/pyjwt#889</a></li> <li>Patch 1 by <a href="https://github.com/juur"><code>@juur</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/891">jpadilla/pyjwt#891</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/896">jpadilla/pyjwt#896</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/898">jpadilla/pyjwt#898</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/900">jpadilla/pyjwt#900</a></li> <li>Update python version by <a href="https://github.com/auvipy"><code>@auvipy</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/895">jpadilla/pyjwt#895</a></li> <li>api_jwt: add a <code>strict_aud</code> option by <a href="https://github.com/woodruffw"><code>@woodruffw</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/902">jpadilla/pyjwt#902</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/juur"><code>@juur</code></a> made their first contribution in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/891">jpadilla/pyjwt#891</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0">https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0</a></p> <h2>2.7.0</h2> <h2>What's Changed</h2> <ul> <li>Add classifier for Python 3.11 by <a href="https://github.com/eseifert"><code>@eseifert</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/818">jpadilla/pyjwt#818</a></li> <li>Add <code>Algorithm.compute_hash_digest</code> and use it to implement at_hash validation example by <a href="https://github.com/sirosen"><code>@sirosen</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/775">jpadilla/pyjwt#775</a></li> <li>fix: use datetime.datetime.timestamp function to have a milliseconds by <a href="https://github.com/daillouf"><code>@daillouf</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/821">jpadilla/pyjwt#821</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/825">jpadilla/pyjwt#825</a></li> <li>Custom header configuration in jwk client by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/823">jpadilla/pyjwt#823</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/828">jpadilla/pyjwt#828</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/833">jpadilla/pyjwt#833</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/835">jpadilla/pyjwt#835</a></li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/829">jpadilla/pyjwt#829</a></li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/832">jpadilla/pyjwt#832</a></li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/830">jpadilla/pyjwt#830</a></li> <li>Bump actions/stale from 6 to 7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/840">jpadilla/pyjwt#840</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/838">jpadilla/pyjwt#838</a></li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/843">jpadilla/pyjwt#843</a></li> <li>Differentiate between two errors by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/809">jpadilla/pyjwt#809</a></li> <li>Fix <code>_validate_iat</code> validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/847">jpadilla/pyjwt#847</a></li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/846">jpadilla/pyjwt#846</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/852">jpadilla/pyjwt#852</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/855">jpadilla/pyjwt#855</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/859">jpadilla/pyjwt#859</a></li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/845">jpadilla/pyjwt#845</a></li> <li>docs: correct mistake in the changelog about verify param by <a href="https://github.com/gbillig"><code>@gbillig</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/866">jpadilla/pyjwt#866</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/868">jpadilla/pyjwt#868</a></li> <li>Bump actions/stale from 7 to 8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/872">jpadilla/pyjwt#872</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/874">jpadilla/pyjwt#874</a></li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/875">jpadilla/pyjwt#875</a></li> <li>Add client connection error exception by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/876">jpadilla/pyjwt#876</a></li> <li>Add complete types to take all allowed keys into account by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/873">jpadilla/pyjwt#873</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/878">jpadilla/pyjwt#878</a></li> <li>Build and upload PyPI package by <a href="https://github.com/jpadilla"><code>@jpadilla</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/884">jpadilla/pyjwt#884</a></li> <li>Fix for issue <a href="https://redirect.github.com/jpadilla/pyjwt/issues/862">#862</a> - ignore invalid keys in a jwks. by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/863">jpadilla/pyjwt#863</a></li> <li>Add <code>as_dict</code> option to <code>Algorithm.to_jwk</code> by <a href="https://github.com/fluxth"><code>@fluxth</code></a> in <a href="https://redirect.github.com/jpadilla/pyjwt/pull/881">jpadilla/pyjwt#881</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst">pyjwt's changelog</a>.</em></p> <blockquote> <h2><code>v2.8.0 <https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0></code>__</h2> <p>Changed</p> <pre><code> - Update python version test matrix by @auvipy in `[#895](jpadilla/pyjwt#895) <https://github.com/jpadilla/pyjwt/pull/895>`__ <p>Fixed</p> <pre><code> Added </code></pre> <ul> <li>Add <code>strict_aud</code> as an option to <code>jwt.decode</code> by <a href="https://github.com/woodruffw"><code>@woodruffw</code></a> in <code>[#902](jpadilla/pyjwt#902) &lt;https://github.com/jpadilla/pyjwt/pull/902&gt;</code>__</li> <li>Export PyJWKClientConnectionError class by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#887](jpadilla/pyjwt#887) &lt;https://github.com/jpadilla/pyjwt/pull/887&gt;</code>__</li> <li>Allows passing of ssl.SSLContext to PyJWKClient by <a href="https://github.com/juur"><code>@juur</code></a> in <code>[#891](jpadilla/pyjwt#891) &lt;https://github.com/jpadilla/pyjwt/pull/891&gt;</code>__</li> </ul> <h2><code>v2.7.0 &lt;https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0&gt;</code>__</h2> <p>Changed </code></pre></p> <ul> <li>Changed the error message when the token audience doesn't match the expected audience by <a href="https://github.com/irdkwmnsb"><code>@irdkwmnsb</code></a> <code>[#809](jpadilla/pyjwt#809) <https://github.com/jpadilla/pyjwt/pull/809></code>__</li> <li>Improve error messages when cryptography isn't installed by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#846](jpadilla/pyjwt#846) <https://github.com/jpadilla/pyjwt/pull/846></code>__</li> <li>Make <code>Algorithm</code> an abstract base class by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#845](jpadilla/pyjwt#845) <https://github.com/jpadilla/pyjwt/pull/845></code>__</li> <li>ignore invalid keys in a jwks by <a href="https://github.com/timw6n"><code>@timw6n</code></a> in <code>[#863](jpadilla/pyjwt#863) <https://github.com/jpadilla/pyjwt/pull/863></code>__</li> </ul> <p>Fixed</p> <pre><code> - Add classifier for Python 3.11 by @eseifert in `[#818](jpadilla/pyjwt#818) <https://github.com/jpadilla/pyjwt/pull/818>`__ - Fix ``_validate_iat`` validation by @Viicos in `[#847](jpadilla/pyjwt#847) <https://github.com/jpadilla/pyjwt/pull/847>`__ - fix: use datetime.datetime.timestamp function to have a milliseconds by @daillouf `[#821](jpadilla/pyjwt#821) <https://github.com/jpadilla/pyjwt/pull/821>`__ - docs: correct mistake in the changelog about verify param by @gbillig in `[#866](jpadilla/pyjwt#866) <https://github.com/jpadilla/pyjwt/pull/866>`__ <p>Added </code></pre></p> <ul> <li>Add <code>compute_hash_digest</code> as a method of <code>Algorithm</code> objects, which uses the underlying hash algorithm to compute a digest. If there is no appropriate hash algorithm, a <code>NotImplementedError</code> will be raised in <code>[#775](jpadilla/pyjwt#775) <https://github.com/jpadilla/pyjwt/pull/775></code>__</li> <li>Add optional <code>headers</code> argument to <code>PyJWKClient</code>. If provided, the headers will be included in requests that the client uses when fetching the JWK set by <a href="https://github.com/thundercat1"><code>@thundercat1</code></a> in <code>[#823](jpadilla/pyjwt#823) <https://github.com/jpadilla/pyjwt/pull/823></code>__</li> <li>Add PyJWT._{de,en}code_payload hooks by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#829](jpadilla/pyjwt#829) <https://github.com/jpadilla/pyjwt/pull/829></code>__</li> <li>Add <code>sort_headers</code> parameter to <code>api_jwt.encode</code> by <a href="https://github.com/evroon"><code>@evroon</code></a> in <code>[#832](jpadilla/pyjwt#832) <https://github.com/jpadilla/pyjwt/pull/832></code>__</li> <li>Make mypy configuration stricter and improve typing by <a href="https://github.com/akx"><code>@akx</code></a> in <code>[#830](jpadilla/pyjwt#830) <https://github.com/jpadilla/pyjwt/pull/830></code>__</li> <li>Add more types by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <code>[#843](jpadilla/pyjwt#843) <https://github.com/jpadilla/pyjwt/pull/843></code>__</li> <li>Add a timeout for PyJWKClient requests by <a href="https://github.com/daviddavis"><code>@daviddavis</code></a> in <code>[#875](jpadilla/pyjwt#875) <https://github.com/jpadilla/pyjwt/pull/875></code>__</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/72ad55f6d7041ae698dc0790a690804118be50fc"><code>72ad55f</code></a> bump version</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/22ba13287874a7a22748b451c7d84f12b2f8ccab"><code>22ba132</code></a> api_jwt: add a <code>strict_aud</code> option (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/902">#902</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6db5df72d031bd49f8a25e84ccf4ec91b2d6af3b"><code>6db5df7</code></a> Update python version (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/895">#895</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6e7027684c37218786c1526c6790a57720602fa9"><code>6e70276</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/900">#900</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/ea351558128d726ead5502409a6a14dc05119578"><code>ea35155</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/898">#898</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/faeae6e54312f9827f369d185f60e99579338309"><code>faeae6e</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/896">#896</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/6cef6f28fa63f2bb01d22ff03868409da24373fd"><code>6cef6f2</code></a> Patch 1 (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/891">#891</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/7f07d50b41d21cb476bf81853257f9f9fedae3bc"><code>7f07d50</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/889">#889</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/1c272817a217c03534feb98004f3f6bd10512e07"><code>1c27281</code></a> Export PyJWKClientConnectionError class (<a href="https://redirect.github.com/jpadilla/pyjwt/issues/887">#887</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/d7c54dbebdab2ae17f7948fd4432b15e1bb82852"><code>d7c54db</code></a> chore: update readme</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.6.0...2.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyjwt&package-manager=pip&previous-version=2.6.0&new-version=2.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
A few fixes I had while trying to fix #602.
I was also wondering if
Algorithm
could be made an abstract base class? Afaik it is not instanciated as is and this would avoid having to explicitly raiseNotImplementedError
.Regarding #602, I might have a few solutions, but that might be tricky to handle (regarding the fact that
cryptography
is optional, as stated in #605). The least that can be done:prepare_key
,sign
andverify
.Algorithm
methods, use a conditional Union including all available types, depending on the availability ofcryptography
(not sure if this will work as excepted).encode
/decode
/decode_complete
public methods.Additionally, overloads could be defined for the methods listed above:
That way type checkers could attest that for instance when using
encode(payload, key, "HS256")
, key should beUnion[str, bytes]
. Although this improves type safety, it adds a lot of boilerplate code.