Skip to content

Commit 990533d

Browse files
authored
docs: RST documentation improvements and typo fixes (#65)
* docs: correct wording in JWT documentation for clarity * docs: correct algorithm reference from HS386 to HS384 in JWT documentation * docs: fix typo in UnsupportedAlgorithmError section * docs: fix formatting in JWE documentation for class reference * docs: correct text for generating an RSA key in JWK documentation * docs: correct wording for clarity in JWK thumbprint method descriptions * docs: format tenant placeholder in Azure configuration examples for clarity
1 parent 49c27e7 commit 990533d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

docs/guide/errors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ UnsupportedAlgorithmError
3333
.. versionadded:: 1.1.0
3434

3535
By default, **ONLY recommended** :ref:`jwa` are allowed. With non recommended
36-
algorithms, you may encounter the ``UnsupportedAlgorithmError``` error.
36+
algorithms, you may encounter the ``UnsupportedAlgorithmError`` error.
3737

3838
.. code-block:: python
3939

docs/guide/jwe.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The syntax of a JWE using the flattened JWE JSON Serialization is as follows:
208208
209209
It is flattened, it moves all the members out of the ``recipients`` field. To
210210
``encrypt_json`` into a flattened serialization, you can construct a
211-
:class`jwe.FlattenedJSONEncryption` instead:
211+
:class:`jwe.FlattenedJSONEncryption` instead:
212212

213213
.. code-block:: python
214214

docs/guide/jwk.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ It represents RSA keys.
7070
Generate an "RSA" key
7171
~~~~~~~~~~~~~~~~~~~~~
7272

73-
You can generate an "EC" key with a given key size (in bit):
73+
You can generate an "RSA" key with a given key size (in bit):
7474

7575
.. code-block:: python
7676
@@ -297,7 +297,7 @@ Key methods
297297
``thumbprint``
298298
~~~~~~~~~~~~~~
299299

300-
Call this method will generate the thumbprint of the JWK, per RFC7638.
300+
Calling this method will generate the thumbprint of the JWK, per RFC7638.
301301

302302
.. code-block:: python
303303
@@ -323,7 +323,7 @@ You can also use the ``jwk.thumbprint`` method:
323323

324324
.. versionadded:: 1.2.0
325325

326-
Call this method will generate the JWK thumbprint URI, per RFC9278.
326+
Calling this method will generate the JWK thumbprint URI, per RFC9278.
327327

328328
.. code-block:: python
329329

docs/guide/jwt.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ You can also pass a JWK Set to the ``key`` parameter of :meth:`encode` and
246246
jwt.encode(header, claims, key_set)
247247
248248
The methods will find the correct key according to the ``kid`` you specified.
249-
If there is no ``kid`` in header, it will pick on randomly and add the ``kid``
249+
If there is no ``kid`` in header, it will pick one randomly and add the ``kid``
250250
of the key into header.
251251

252252
A client would usually get the public key set from a public URL, normally the
@@ -362,7 +362,7 @@ You can find out the recommended algorithms at:
362362
- :ref:`JSON Web Signature Algorithms <jws_algorithms>`
363363
- :ref:`JSON Web Encryption Algorithms <jwe_algorithms>`
364364

365-
For instance, ``HS386`` is not a recommended algorithm, and you want to use
365+
For instance, ``HS384`` is not a recommended algorithm, and you want to use
366366
this algorithm:
367367

368368
.. code-block:: python

docs/recipes/azure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ the following format:
6868
6969
https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration
7070
71-
In the example provided, replace {tenant} with your specific Azure tenant ID or
71+
In the example provided, replace ``{tenant}`` with your specific Azure tenant ID or
7272
the tenant's globally unique identifier (GUID). The resulting URL will lead you
7373
to the OpenID configuration details. Then, the OpenID configuration endpoint for
7474
the above example could be:
@@ -88,7 +88,7 @@ can typically be found within the configuration as follows:
8888
8989
https://login.microsoftonline.com/{tenant}/discovery/v2.0/keys
9090
91-
Once again, remember to replace {tenant} with your Azure tenant ID or the appropriate identifier.
91+
Once again, remember to replace ``{tenant}`` with your Azure tenant ID or the appropriate identifier.
9292
In the above example, the ``jwks_uri`` could be:
9393

9494
.. code-block:: none

0 commit comments

Comments
 (0)