Skip to content

Commit

Permalink
Documentation for config override
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed Dec 26, 2019
1 parent 71c9f04 commit b5d4ff3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/source/pages/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ This brings up an important point. If you go with the getter method, then in ord

As you can see, the getter method is passed the ``request`` object as a parameter.

------------------
Temporary override
------------------

Sometimes you may need to only change a value for a brief moment. There is an ``auth.override()`` method that allows you to handle these situations seemlesly. Anything executed inside the ``with`` statement will have the modified value.

.. code-block:: python
with app.auth.override(expiration_delta=1440):
token = app.auth.generate_access_token(user)
------------

++++++++
Expand Down

0 comments on commit b5d4ff3

Please sign in to comment.