diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2016-11-09 16:51:55 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2016-11-09 16:51:55 -0500 |
| commit | 43e9eabec98a726fd5165fd2c06deba4d543adab (patch) | |
| tree | b11c0a417edf970b009a1b655c886c48ee13d0fc /docs/lib | |
| parent | b3e53bc1d8710289189f7d9c3afb43539e6f87d7 (diff) | |
| download | passlib-43e9eabec98a726fd5165fd2c06deba4d543adab.tar.gz | |
totp: corrections to tutorial
Diffstat (limited to 'docs/lib')
| -rw-r--r-- | docs/lib/passlib.totp-tutorial.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/lib/passlib.totp-tutorial.rst b/docs/lib/passlib.totp-tutorial.rst index d3c8891..7a35c11 100644 --- a/docs/lib/passlib.totp-tutorial.rst +++ b/docs/lib/passlib.totp-tutorial.rst @@ -113,6 +113,8 @@ to uniquely identify your application, and a "label" string to uniquely identify The following example creates a new TOTP instance with a new key, and renders it to a URI, plugging in application-specific information. +Using the ``TotpFactory`` object set up in step 2:: + >>> totp = TotpFactory.new() >>> uri = totp.to_uri(issuer="myapp.example.org", label="username") >>> uri @@ -175,6 +177,7 @@ A skeleton example of how this should function:: >>> # check attempt rate limit for this account / address (per step 3 above) + >>> # using the TotpFactory object defined in step 2, >>> # invoke verify >>> try: ... match = TotpFactory.verify(token, source, last_counter=last_counter) |
