PyOTP 2.2.7__tar.gz → 2.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyotp-2.2.7/src/pyotp.egg-info → pyotp-2.2.8}/PKG-INFO +19 -10
- {pyotp-2.2.7 → pyotp-2.2.8}/README.rst +15 -8
- {pyotp-2.2.7 → pyotp-2.2.8}/setup.py +4 -2
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/utils.py +1 -1
- {pyotp-2.2.7 → pyotp-2.2.8/src/pyotp.egg-info}/PKG-INFO +19 -10
- {pyotp-2.2.7 → pyotp-2.2.8}/test.py +3 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/LICENSE +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/MANIFEST.in +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/requirements.txt +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/setup.cfg +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/__init__.py +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/compat.py +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/hotp.py +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/otp.py +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp/totp.py +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp.egg-info/SOURCES.txt +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp.egg-info/dependency_links.txt +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp.egg-info/not-zip-safe +0 -0
- {pyotp-2.2.7 → pyotp-2.2.8}/src/pyotp.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyotp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: Python One Time Password Library
|
|
5
5
|
Home-page: https://github.com/pyotp/pyotp
|
|
6
6
|
Author: PyOTP contributors
|
|
@@ -29,14 +29,16 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
29
29
|
- Deny replay attacks by rejecting one-time passwords that have been used by the client (this requires storing the most
|
|
30
30
|
recently authenticated timestamp, OTP, or hash of the OTP in your database, and rejecting the OTP when a match is seen)
|
|
31
31
|
- Throttle brute-force attacks against your application's login functionality
|
|
32
|
-
- When implementing a "
|
|
33
|
-
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_
|
|
34
|
-
cryptography to avoid using a shared secret design, which strengthens your
|
|
35
|
-
Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
36
|
-
against client-side
|
|
32
|
+
- When implementing a "greenfield" application, consider supporting
|
|
33
|
+
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_/`WebAuthn <https://www.w3.org/TR/webauthn/>`_ in
|
|
34
|
+
addition to HOTP/TOTP. U2F uses asymmetric cryptography to avoid using a shared secret design, which strengthens your
|
|
35
|
+
MFA solution against server-side attacks. Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
36
|
+
device, which strengthens your clients against client-side attacks. And by automating scoping of credentials to
|
|
37
|
+
relying party IDs (application origin/domain names), U2F adds protection against phishing attacks. One implementation of
|
|
38
|
+
FIDO U2F/WebAuthn is PyOTP's sister project, `PyWARP <https://github.com/pyauth/pywarp>`_.
|
|
37
39
|
|
|
38
40
|
We also recommend that implementers read the
|
|
39
|
-
`OWASP Authentication Cheat Sheet <https://
|
|
41
|
+
`OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_ and
|
|
40
42
|
`NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of
|
|
41
43
|
authentication best practices.
|
|
42
44
|
|
|
@@ -110,7 +112,7 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
110
112
|
|
|
111
113
|
Scan the following barcode with your phone's OTP app (e.g. Google Authenticator):
|
|
112
114
|
|
|
113
|
-
.. image::
|
|
115
|
+
.. image:: https://chart.apis.google.com/chart?cht=qr&chs=250x250&chl=otpauth%3A%2F%2Ftotp%2Falice%40google.com%3Fsecret%3DJBSWY3DPEHPK3PXP
|
|
114
116
|
|
|
115
117
|
Now run the following and compare the output::
|
|
116
118
|
|
|
@@ -129,9 +131,14 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
129
131
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
130
132
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
131
133
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
132
|
-
* `OWASP Authentication Cheat Sheet <https://
|
|
134
|
+
* `OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_
|
|
133
135
|
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
134
136
|
|
|
137
|
+
For new applications:
|
|
138
|
+
|
|
139
|
+
* `WebAuthn <https://www.w3.org/TR/webauthn/>`_
|
|
140
|
+
* `PyWARP <https://github.com/pyauth/pywarp>`_
|
|
141
|
+
|
|
135
142
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
136
143
|
:target: https://travis-ci.org/pyotp/pyotp
|
|
137
144
|
.. image:: https://img.shields.io/codecov/c/github/pyotp/pyotp/master.svg
|
|
@@ -151,6 +158,8 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
151
158
|
Classifier: Operating System :: POSIX
|
|
152
159
|
Classifier: Programming Language :: Python
|
|
153
160
|
Classifier: Programming Language :: Python :: 2.7
|
|
154
|
-
Classifier: Programming Language :: Python :: 3.3
|
|
155
161
|
Classifier: Programming Language :: Python :: 3.4
|
|
162
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
163
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
164
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
156
165
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -21,14 +21,16 @@ minimum, application implementers should follow this checklist:
|
|
|
21
21
|
- Deny replay attacks by rejecting one-time passwords that have been used by the client (this requires storing the most
|
|
22
22
|
recently authenticated timestamp, OTP, or hash of the OTP in your database, and rejecting the OTP when a match is seen)
|
|
23
23
|
- Throttle brute-force attacks against your application's login functionality
|
|
24
|
-
- When implementing a "
|
|
25
|
-
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_
|
|
26
|
-
cryptography to avoid using a shared secret design, which strengthens your
|
|
27
|
-
Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
28
|
-
against client-side
|
|
24
|
+
- When implementing a "greenfield" application, consider supporting
|
|
25
|
+
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_/`WebAuthn <https://www.w3.org/TR/webauthn/>`_ in
|
|
26
|
+
addition to HOTP/TOTP. U2F uses asymmetric cryptography to avoid using a shared secret design, which strengthens your
|
|
27
|
+
MFA solution against server-side attacks. Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
28
|
+
device, which strengthens your clients against client-side attacks. And by automating scoping of credentials to
|
|
29
|
+
relying party IDs (application origin/domain names), U2F adds protection against phishing attacks. One implementation of
|
|
30
|
+
FIDO U2F/WebAuthn is PyOTP's sister project, `PyWARP <https://github.com/pyauth/pywarp>`_.
|
|
29
31
|
|
|
30
32
|
We also recommend that implementers read the
|
|
31
|
-
`OWASP Authentication Cheat Sheet <https://
|
|
33
|
+
`OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_ and
|
|
32
34
|
`NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of
|
|
33
35
|
authentication best practices.
|
|
34
36
|
|
|
@@ -102,7 +104,7 @@ Working example
|
|
|
102
104
|
|
|
103
105
|
Scan the following barcode with your phone's OTP app (e.g. Google Authenticator):
|
|
104
106
|
|
|
105
|
-
.. image::
|
|
107
|
+
.. image:: https://chart.apis.google.com/chart?cht=qr&chs=250x250&chl=otpauth%3A%2F%2Ftotp%2Falice%40google.com%3Fsecret%3DJBSWY3DPEHPK3PXP
|
|
106
108
|
|
|
107
109
|
Now run the following and compare the output::
|
|
108
110
|
|
|
@@ -121,9 +123,14 @@ Links
|
|
|
121
123
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
122
124
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
123
125
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
124
|
-
* `OWASP Authentication Cheat Sheet <https://
|
|
126
|
+
* `OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_
|
|
125
127
|
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
126
128
|
|
|
129
|
+
For new applications:
|
|
130
|
+
|
|
131
|
+
* `WebAuthn <https://www.w3.org/TR/webauthn/>`_
|
|
132
|
+
* `PyWARP <https://github.com/pyauth/pywarp>`_
|
|
133
|
+
|
|
127
134
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
128
135
|
:target: https://travis-ci.org/pyotp/pyotp
|
|
129
136
|
.. image:: https://img.shields.io/codecov/c/github/pyotp/pyotp/master.svg
|
|
@@ -7,7 +7,7 @@ install_requires = [line.rstrip() for line in open(os.path.join(os.path.dirname(
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name="pyotp",
|
|
10
|
-
version="2.2.
|
|
10
|
+
version="2.2.8",
|
|
11
11
|
url="https://github.com/pyotp/pyotp",
|
|
12
12
|
license="MIT License",
|
|
13
13
|
author="PyOTP contributors",
|
|
@@ -27,8 +27,10 @@ setup(
|
|
|
27
27
|
"Operating System :: POSIX",
|
|
28
28
|
"Programming Language :: Python",
|
|
29
29
|
"Programming Language :: Python :: 2.7",
|
|
30
|
-
"Programming Language :: Python :: 3.3",
|
|
31
30
|
"Programming Language :: Python :: 3.4",
|
|
31
|
+
"Programming Language :: Python :: 3.5",
|
|
32
|
+
"Programming Language :: Python :: 3.6",
|
|
33
|
+
"Programming Language :: Python :: 3.7",
|
|
32
34
|
"Topic :: Software Development :: Libraries :: Python Modules"
|
|
33
35
|
]
|
|
34
36
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyotp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: Python One Time Password Library
|
|
5
5
|
Home-page: https://github.com/pyotp/pyotp
|
|
6
6
|
Author: PyOTP contributors
|
|
@@ -29,14 +29,16 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
29
29
|
- Deny replay attacks by rejecting one-time passwords that have been used by the client (this requires storing the most
|
|
30
30
|
recently authenticated timestamp, OTP, or hash of the OTP in your database, and rejecting the OTP when a match is seen)
|
|
31
31
|
- Throttle brute-force attacks against your application's login functionality
|
|
32
|
-
- When implementing a "
|
|
33
|
-
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_
|
|
34
|
-
cryptography to avoid using a shared secret design, which strengthens your
|
|
35
|
-
Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
36
|
-
against client-side
|
|
32
|
+
- When implementing a "greenfield" application, consider supporting
|
|
33
|
+
`FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_/`WebAuthn <https://www.w3.org/TR/webauthn/>`_ in
|
|
34
|
+
addition to HOTP/TOTP. U2F uses asymmetric cryptography to avoid using a shared secret design, which strengthens your
|
|
35
|
+
MFA solution against server-side attacks. Hardware U2F also sequesters the client secret in a dedicated single-purpose
|
|
36
|
+
device, which strengthens your clients against client-side attacks. And by automating scoping of credentials to
|
|
37
|
+
relying party IDs (application origin/domain names), U2F adds protection against phishing attacks. One implementation of
|
|
38
|
+
FIDO U2F/WebAuthn is PyOTP's sister project, `PyWARP <https://github.com/pyauth/pywarp>`_.
|
|
37
39
|
|
|
38
40
|
We also recommend that implementers read the
|
|
39
|
-
`OWASP Authentication Cheat Sheet <https://
|
|
41
|
+
`OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_ and
|
|
40
42
|
`NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of
|
|
41
43
|
authentication best practices.
|
|
42
44
|
|
|
@@ -110,7 +112,7 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
110
112
|
|
|
111
113
|
Scan the following barcode with your phone's OTP app (e.g. Google Authenticator):
|
|
112
114
|
|
|
113
|
-
.. image::
|
|
115
|
+
.. image:: https://chart.apis.google.com/chart?cht=qr&chs=250x250&chl=otpauth%3A%2F%2Ftotp%2Falice%40google.com%3Fsecret%3DJBSWY3DPEHPK3PXP
|
|
114
116
|
|
|
115
117
|
Now run the following and compare the output::
|
|
116
118
|
|
|
@@ -129,9 +131,14 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
129
131
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
130
132
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
131
133
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
132
|
-
* `OWASP Authentication Cheat Sheet <https://
|
|
134
|
+
* `OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_
|
|
133
135
|
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
134
136
|
|
|
137
|
+
For new applications:
|
|
138
|
+
|
|
139
|
+
* `WebAuthn <https://www.w3.org/TR/webauthn/>`_
|
|
140
|
+
* `PyWARP <https://github.com/pyauth/pywarp>`_
|
|
141
|
+
|
|
135
142
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
136
143
|
:target: https://travis-ci.org/pyotp/pyotp
|
|
137
144
|
.. image:: https://img.shields.io/codecov/c/github/pyotp/pyotp/master.svg
|
|
@@ -151,6 +158,8 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
151
158
|
Classifier: Operating System :: POSIX
|
|
152
159
|
Classifier: Programming Language :: Python
|
|
153
160
|
Classifier: Programming Language :: Python :: 2.7
|
|
154
|
-
Classifier: Programming Language :: Python :: 3.3
|
|
155
161
|
Classifier: Programming Language :: Python :: 3.4
|
|
162
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
163
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
164
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
156
165
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -261,6 +261,9 @@ class StringComparisonTest(CompareDigestTest):
|
|
|
261
261
|
def test_fullwidth_input(self):
|
|
262
262
|
self.assertTrue(self.method("xs12345", "xs12345"))
|
|
263
263
|
|
|
264
|
+
def test_unicode_equal(self):
|
|
265
|
+
self.assertTrue(self.method("ěšč45", "ěšč45"))
|
|
266
|
+
|
|
264
267
|
|
|
265
268
|
class CounterOffsetTest(unittest.TestCase):
|
|
266
269
|
def test_counter_offset(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|