<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pyjwt.git/docs, branch master</title>
<subtitle>github.com: progrium/pyjwt.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/'/>
<entry>
<title>Make mypy configuration stricter and improve typing (#830)</title>
<updated>2022-12-10T15:44:04+00:00</updated>
<author>
<name>Aarni Koskela</name>
<email>akx@iki.fi</email>
</author>
<published>2022-12-10T15:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=2306f68b87c5f7eecbd838db900a2d3685b81b3c'/>
<id>2306f68b87c5f7eecbd838db900a2d3685b81b3c</id>
<content type='text'>
* 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 &amp; 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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &amp; 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</pre>
</div>
</content>
</entry>
<entry>
<title>Custom header configuration in jwk client (#823)</title>
<updated>2022-11-16T03:47:00+00:00</updated>
<author>
<name>Michael Haines</name>
<email>michael.c.haines@gmail.com</email>
</author>
<published>2022-11-16T03:47:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=300348f7bc4a520448b8fbefa525c9434e82141d'/>
<id>300348f7bc4a520448b8fbefa525c9434e82141d</id>
<content type='text'>
* 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 &lt;michael.haines@recursionpharma.com&gt;
Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &lt;michael.haines@recursionpharma.com&gt;
Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Add `Algorithm.compute_hash_digest` and use it to implement at_hash validation example (#775)</title>
<updated>2022-11-02T11:01:52+00:00</updated>
<author>
<name>Stephen Rosen</name>
<email>sirosen@globus.org</email>
</author>
<published>2022-11-02T11:01:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=00cd759d86aae24176ead7bdbed273a07532443e'/>
<id>00cd759d86aae24176ead7bdbed273a07532443e</id>
<content type='text'>
* 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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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</pre>
</div>
</content>
</entry>
<entry>
<title>Update audience typing (#782)</title>
<updated>2022-07-31T15:24:02+00:00</updated>
<author>
<name>Julian Maurin</name>
<email>julian.maurin.perso@pm.me</email>
</author>
<published>2022-07-31T15:24:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=98a5c1d61ee180f5b3574e142f5938d24146ee99'/>
<id>98a5c1d61ee180f5b3574e142f5938d24146ee99</id>
<content type='text'>
* fix(api_jwt): update audience typing &amp; type checking

* doc(api): update decode.audience typing

* feat(test_api_jwt): ensure audience as bytes raises error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refacto(api_jwt): precise typing

Co-authored-by: Julian Maurin &lt;julian.maurin.perso@pm.me&gt;

Update jwt/api_jwt.py

Co-authored-by: Julian Maurin &lt;julian.maurin.perso@pm.me&gt;

fix(jwt/api_jwt.py): backport future annotations

* fix: handle audience=0

Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;
Co-authored-by: Asif Saif Uddin &lt;auvipy@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix(api_jwt): update audience typing &amp; type checking

* doc(api): update decode.audience typing

* feat(test_api_jwt): ensure audience as bytes raises error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refacto(api_jwt): precise typing

Co-authored-by: Julian Maurin &lt;julian.maurin.perso@pm.me&gt;

Update jwt/api_jwt.py

Co-authored-by: Julian Maurin &lt;julian.maurin.perso@pm.me&gt;

fix(jwt/api_jwt.py): backport future annotations

* fix: handle audience=0

Co-authored-by: pre-commit-ci[bot] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;
Co-authored-by: Asif Saif Uddin &lt;auvipy@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for headers disorder issue (#721)</title>
<updated>2022-07-19T11:25:20+00:00</updated>
<author>
<name>kadabusha</name>
<email>47604788+kadabusha@users.noreply.github.com</email>
</author>
<published>2022-07-19T11:25:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=0bef0fbff5c245668578a43774d8620bdba4a6f7'/>
<id>0bef0fbff5c245668578a43774d8620bdba4a6f7</id>
<content type='text'>
* Fix for headers disorder issue

Related issue #715

* Added comment with reference to issue

 Needed to trigger tests once more time.

* Fix for hardcoded value in docs after adding sort to jwt/api_jws.py

* Removed unneeded comment - issue #721</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix for headers disorder issue

Related issue #715

* Added comment with reference to issue

 Needed to trigger tests once more time.

* Fix for hardcoded value in docs after adding sort to jwt/api_jws.py

* Removed unneeded comment - issue #721</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed TypeError (#738)</title>
<updated>2022-03-08T14:35:56+00:00</updated>
<author>
<name>Abram (^o^)</name>
<email>israelvictory87@gmail.com</email>
</author>
<published>2022-03-08T14:35:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=6a624f42112661d1e4ea43ce7a78a9d6c693644b'/>
<id>6a624f42112661d1e4ea43ce7a78a9d6c693644b</id>
<content type='text'>
In the example above [https://github.com/jpadilla/pyjwt/edit/master/docs/usage.rst#encoding--decoding-tokens-with-hs256], when tried, it throws a TypeError that says: `encode() got an unexpected keyword argument 'algorithms'`, so I changed the `algorithms` to `algorithm`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the example above [https://github.com/jpadilla/pyjwt/edit/master/docs/usage.rst#encoding--decoding-tokens-with-hs256], when tried, it throws a TypeError that says: `encode() got an unexpected keyword argument 'algorithms'`, so I changed the `algorithms` to `algorithm`</pre>
</div>
</content>
</entry>
<entry>
<title>Docs: mention performance reasons for reusing RSAPrivateKey when encoding (#734)</title>
<updated>2022-02-15T03:40:36+00:00</updated>
<author>
<name>Dan Mahr</name>
<email>danmahr23@gmail.com</email>
</author>
<published>2022-02-15T03:40:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=827d4425dbd2e6f9b521e514ced889cfb3aada21'/>
<id>827d4425dbd2e6f9b521e514ced889cfb3aada21</id>
<content type='text'>
* Mention reusing RSAPrivateKey for performance reasons

* [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] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Mention reusing RSAPrivateKey for performance reasons

* [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] &lt;66853113+pre-commit-ci[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix: Update copyright information (#729)</title>
<updated>2022-02-02T03:29:13+00:00</updated>
<author>
<name>Kevin Kirsche</name>
<email>kevin.kirsche@one.verizon.com</email>
</author>
<published>2022-02-02T03:29:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=b4c579785803374cd5c08046c927d713c7324b78'/>
<id>b4c579785803374cd5c08046c927d713c7324b78</id>
<content type='text'>
Fix: #458</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix: #458</pre>
</div>
</content>
</entry>
<entry>
<title>Update usage.rst (#727)</title>
<updated>2022-01-28T13:11:57+00:00</updated>
<author>
<name>guneybilen</name>
<email>guneybilen@yahoo.com</email>
</author>
<published>2022-01-28T13:11:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=86820d338ddbbfa48f60730f00579a26445f17e6'/>
<id>86820d338ddbbfa48f60730f00579a26445f17e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>documentation fix: show correct scope for decode_complete() (#661)</title>
<updated>2021-12-10T09:22:37+00:00</updated>
<author>
<name>sseering</name>
<email>git-public@stefan.seeri.ng</email>
</author>
<published>2021-12-10T09:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pyjwt.git/commit/?id=a3e2d8eb658fbd7677bacfe40189956d47b94ef2'/>
<id>a3e2d8eb658fbd7677bacfe40189956d47b94ef2</id>
<content type='text'>
Co-authored-by: Stefan Seering &lt;sseering@todo.find.proper.mail.domain&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Stefan Seering &lt;sseering@todo.find.proper.mail.domain&gt;</pre>
</div>
</content>
</entry>
</feed>
