Skip to content

Commit

Permalink
Fix typos in documentation (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
pylipp committed Sep 27, 2021
1 parent 7cfc74a commit 2b6f69d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/add_custom_data_claims.rst
Expand Up @@ -19,7 +19,7 @@ decorator to register a callback function that will be called whenever a new JWT
is created, and return a dictionary of claims to add to that token. In the case
that both :meth:`~flask_jwt_extended.JWTManager.additional_claims_loader` and the
``additional_claims`` argument are used, both results are merged together, with ties
going to the data suplied by the ``additional_claims`` argument.
going to the data supplied by the ``additional_claims`` argument.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions docs/automatic_user_loading.rst
Expand Up @@ -3,13 +3,13 @@ Automatic User Loading

In most web applications it is important to have access to the user who is
accessing a protected route. We provide a couple callback functions that make
this seemless while working with JWTs.
this seamless while working with JWTs.

The first is :meth:`~flask_jwt_extended.JWTManager.user_identity_loader`, which
will convert any ``User`` object used to create a JWT into a JSON serializable format.

On the flip side, you can use :meth:`~flask_jwt_extended.JWTManager.user_lookup_loader`
to automaticallly load your ``User`` object when a JWT is present in the request.
to automatically load your ``User`` object when a JWT is present in the request.
The loaded user is available in your protected routes via :attr:`~flask_jwt_extended.current_user`.

Lets see an example of this while utilizing SQLAlchemy to store our users:
Expand Down
4 changes: 2 additions & 2 deletions docs/basic_usage.rst
Expand Up @@ -64,7 +64,7 @@ We can see this in action using `HTTPie <https://httpie.io/>`_.
**Important**

Remember to change the jwt secret key in your application, and ensure that it
Remember to change the JWT secret key in your application, and ensure that it
is secure. The JWTs are signed with this key, and if someone gets their hands
on it they will be able to create arbitraty tokens that are accepted by your
on it they will be able to create arbitrary tokens that are accepted by your
web flask application.
4 changes: 2 additions & 2 deletions docs/optional_endpoints.rst
Expand Up @@ -2,7 +2,7 @@ Partially protecting routes
===========================

There may be cases where you want to use the same route regardless of if a JWT
is present in the requst or not. In these situations, you can use
is present in the request or not. In these situations, you can use
:func:`~flask_jwt_extended.jwt_required` with the ``optional=True`` argument. This
will allow the endpoint to be accessed regardless of if a JWT is sent in with
the request.
Expand All @@ -12,7 +12,7 @@ If no JWT is present, :func:`~flask_jwt_extended.get_jwt` and
:func:`~flask_jwt_extended.get_jwt_identity`, :attr:`~flask_jwt_extended.current_user`,
and :func:`~flask_jwt_extended.get_current_user` will return None.

If a JWT that is expired or not verifyable is in the request, an error will be
If a JWT that is expired or not verifiable is in the request, an error will be
still returned like normal.


Expand Down
12 changes: 6 additions & 6 deletions docs/options.rst
Expand Up @@ -20,7 +20,7 @@ General Options:
``["headers", "cookies"]``. The order of the list sets the precedence of
where JWTs will be looked for.

This can be overriden on a per-route basis by using the ``locations``
This can be overridden on a per-route basis by using the ``locations``
argument in :func:`flask_jwt_extended.jwt_required`.

Default: ``"headers"``
Expand Down Expand Up @@ -61,15 +61,15 @@ General Options:
.. py:data:: JWT_ALGORITHM
Which algorithm to sign the JWT with. See `PyJWT <https://pyjwt.readthedocs.io/en/latest/algorithms.html>`_
for the available algorightms.
for the available algorithms.

Default: ``"HS256"``


.. py:data:: JWT_DECODE_ALGORITHMS
Which algorithms to use when decoding a JWT. See `PyJWT <https://pyjwt.readthedocs.io/en/latest/algorithms.html>`_
for the available algorightms.
for the available algorithms.

By default this will always be the same algorithm that is defined in ``JWT_ALGORITHM``.

Expand All @@ -79,7 +79,7 @@ General Options:
.. py:data:: JWT_SECRET_KEY
The secret key used to encode and decode JWTs when using a symmetric signing
algorightm (such as ``HS*``). It should be a long random string of bytes,
algorithm (such as ``HS*``). It should be a long random string of bytes,
although unicode is accepted too. For example, copy the output of this to
your config.

Expand All @@ -99,7 +99,7 @@ General Options:
.. py:data:: JWT_PRIVATE_KEY
The secret key used to encode JWTs when using an asymmetric signing
algorightm (such as ``RS*`` or ``ES*``). The key must be in PEM format.
algorithm (such as ``RS*`` or ``ES*``). The key must be in PEM format.

**Do not reveal the secret key when posting questions or committing code.**

Expand All @@ -109,7 +109,7 @@ General Options:
.. py:data:: JWT_PUBLIC_KEY
The secret key used to decode JWTs when using an asymmetric signing
algorightm (such as ``RS*`` or ``ES*``). The key must be in PEM format.
algorithm (such as ``RS*`` or ``ES*``). The key must be in PEM format.

Default: ``None``

Expand Down

0 comments on commit 2b6f69d

Please sign in to comment.