diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2016-10-03 18:42:13 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2016-10-03 18:42:13 -0400 |
| commit | 1f09d22394fdd2c82e77529f78cbb5f920d096f8 (patch) | |
| tree | a84f4fba21e106be435ac4d231319d9cf2e71728 /docs/lib/passlib.totp-tutorial.rst | |
| parent | 1c618f549b45480b47968246a05a497038958bcd (diff) | |
| download | passlib-1f09d22394fdd2c82e77529f78cbb5f920d096f8.tar.gz | |
totp: documented the global from_uri() / from_json() helpers, as well as to_dict() method.
Diffstat (limited to 'docs/lib/passlib.totp-tutorial.rst')
| -rw-r--r-- | docs/lib/passlib.totp-tutorial.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/lib/passlib.totp-tutorial.rst b/docs/lib/passlib.totp-tutorial.rst index df1688d..39a8382 100644 --- a/docs/lib/passlib.totp-tutorial.rst +++ b/docs/lib/passlib.totp-tutorial.rst @@ -157,6 +157,12 @@ their output is relatively simple to inspect (e.g. in Postgres JSON columns), they can include stateful data (see :ref:`totp-stateful-usage` below), and they support storing the keys in an encrypted fashion (see :ref:`totp-context-usage` below). +For cases where a python dictionary is more useful than a json string, +the :meth:`BaseOTP.to_dict` method returns a python dict identical to parsing +the output of :meth:`BaseOTP.to_json`. This value can be reconstructed +via :func:`from_json`, which will autodetect whether the input +is a dictionary vs string. + .. seealso:: For more details, see the :meth:`~passlib.totp.BaseOTP.from_json` constructor, |
