Skip to content

Commit 8ced1fd

Browse files
committed
chore: release 1.2.0
1 parent 11dbee6 commit 8ced1fd

File tree

5 files changed

+35
-10
lines changed

5 files changed

+35
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ It follows RFCs with extensible API. The module has implementations of:
5353
- RFC7797: [JSON Web Signature (JWS) Unencoded Payload Option](https://jose.authlib.org/en/dev/guide/jws/#rfc7797)
5454
- RFC8037: ``OKP`` Key and ``EdDSA`` algorithm
5555
- RFC8812: ``ES256K`` algorithm
56-
- RFC9278: [JWK Thumbprint URI](https://jose.authlib.org/en/api/jwk/#joserfc.jwk.thumbprint_uri)
56+
- RFC9278: [JWK Thumbprint URI](https://jose.authlib.org/en/guide/jwk/#thumbprint-uri)
5757

5858
And draft RFCs implementation of:
5959

docs/changelog.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ Changelog
1515
1.2.0
1616
-----
1717

18-
**Unreleased**
18+
**Released on July 7, 2025**
1919

20+
- Added RFC9278 JWK Thumbprint URI ``thumbprint_uri``.
2021
- Show security warnings for ``none`` and ``RSA1_5`` algorithms.
21-
- Show security warnings for ``OctKey.generate_key`` and ``RSAKey.generate_key``
22+
- Show security warnings for ``OctKey.generate_key`` and ``RSAKey.generate_key``.
2223
when key size is too short, per `NIST SP 800-131A`_.
2324

2425
.. _`NIST SP 800-131A`: https://csrc.nist.gov/publications/detail/sp/800-131a/rev-2/final
@@ -53,22 +54,22 @@ Changelog
5354
1.0.4
5455
-----
5556

56-
**Released on Feb 28, 2025**
57+
**Released on February 28, 2025**
5758

5859
- Use secrets module to generate random bytes.
5960
- Use warnings for possible unsafe ``OctKey`` instead of raising error, via :issue:`32`.
6061

6162
1.0.3
6263
-----
6364

64-
**Released on Feb 6, 2025**
65+
**Released on February 6, 2025**
6566

6667
- Allow using sha256, sha384, sha512 hash functions in thumbprint (RFC7638).
6768

6869
1.0.2
6970
-----
7071

71-
**Released on Jan 20, 2025**
72+
**Released on January 20, 2025**
7273

7374
- Support import key from a certificate pem file.
7475

docs/guide/jwk.rst

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,26 @@ Key methods
297297
``thumbprint``
298298
~~~~~~~~~~~~~~
299299

300-
Call this method will generate the thumbprint with algorithm defined in RFC7638.
300+
Call this method will generate the thumbprint of the JWK, per RFC7638.
301301

302302
.. code-block:: python
303303
304304
>>> from joserfc.jwk import OctKey
305305
>>> key = OctKey.generate_key()
306306
>>> key.thumbprint()
307-
'RltMKTBXPdfe_CssBuyDK0pz17m0lKVraYEGfSlS6Ow'
307+
'DCdRGGDKvhAJgmVlCp6tosc2T9ELtd30S_15vn8bhrI'
308+
309+
You can also use the ``jwk.thumbprint`` method:
310+
311+
.. code-block:: python
312+
313+
from joserfc import jwk
314+
jwk.thumbprint({
315+
'kty': 'oct',
316+
'k': 'sTBpI_oCHSyW-n0exSwhzNHwU9FGRioPauxWA84bnRU',
317+
})
318+
# 'DCdRGGDKvhAJgmVlCp6tosc2T9ELtd30S_15vn8bhrI'
319+
308320
309321
``thumbprint_uri``
310322
~~~~~~~~~~~~~~~~~~
@@ -318,7 +330,18 @@ Call this method will generate the JWK thumbprint URI, per RFC9278.
318330
>>> from joserfc.jwk import OctKey
319331
>>> key = OctKey.generate_key()
320332
>>> key.thumbprint_uri()
321-
'urn:ietf:params:oauth:jwk-thumbprint:sha-256:RltMKTBXPdfe_CssBuyDK0pz17m0lKVraYEGfSlS6Ow'
333+
'urn:ietf:params:oauth:jwk-thumbprint:sha-256:DCdRGGDKvhAJgmVlCp6tosc2T9ELtd30S_15vn8bhrI'
334+
335+
You can also use the ``jwk.thumbprint_uri`` method:
336+
337+
.. code-block:: python
338+
339+
from joserfc import jwk
340+
jwk.thumbprint_uri({
341+
'kty': 'oct',
342+
'k': 'sTBpI_oCHSyW-n0exSwhzNHwU9FGRioPauxWA84bnRU',
343+
})
344+
# 'urn:ietf:params:oauth:jwk-thumbprint:sha-256:DCdRGGDKvhAJgmVlCp6tosc2T9ELtd30S_15vn8bhrI'
322345
323346
.. _ensure_kid:
324347

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ It follows RFCs with extensible API. The module has implementations of:
5151
- RFC7638: ``thumbprint`` for JWK
5252
- RFC8037: :ref:`OKPKey` and ``EdDSA`` algorithm
5353
- RFC8812: ``ES256K`` algorithm
54+
- RFC9278: ``thumbprint_uri`` for JWK
5455

5556
And draft RFCs implementation of:
5657

src/joserfc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.1.0"
1+
__version__ = "1.2.0"
22
__homepage__ = "https://jose.authlib.org/en/"
33
__author__ = "Hsiaoming Yang <[email protected]>"
44
__license__ = "BSD-3-Clause"

0 commit comments

Comments
 (0)