PyOTP 2.2.1__tar.gz → 2.2.4__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.1/src/pyotp.egg-info → pyotp-2.2.4}/PKG-INFO +5 -1
- {pyotp-2.2.1 → pyotp-2.2.4}/README.rst +4 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/setup.cfg +1 -1
- pyotp-2.2.4/setup.py +34 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/utils.py +1 -1
- {pyotp-2.2.1 → pyotp-2.2.4/src/pyotp.egg-info}/PKG-INFO +5 -1
- {pyotp-2.2.1 → pyotp-2.2.4}/test.py +5 -8
- pyotp-2.2.1/setup.py +0 -34
- {pyotp-2.2.1 → pyotp-2.2.4}/LICENSE +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/MANIFEST.in +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/requirements.txt +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/__init__.py +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/compat.py +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/hotp.py +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/otp.py +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp/totp.py +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp.egg-info/SOURCES.txt +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp.egg-info/dependency_links.txt +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/src/pyotp.egg-info/not-zip-safe +0 -0
- {pyotp-2.2.1 → pyotp-2.2.4}/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.4
|
|
4
4
|
Summary: Python One Time Password Library
|
|
5
5
|
Home-page: https://github.com/pyotp/pyotp
|
|
6
6
|
Author: PyOTP contributors
|
|
@@ -20,6 +20,8 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
20
20
|
compatible app. Users can set up auth tokens in their apps easily by using their phone camera to scan `otpauth://
|
|
21
21
|
<https://github.com/google/google-authenticator/wiki/Key-Uri-Format>`_ QR codes provided by PyOTP.
|
|
22
22
|
|
|
23
|
+
We recommend that implementers read the `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_ and `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of authentication best practices.
|
|
24
|
+
|
|
23
25
|
Quick overview of using One Time Passwords on your phone
|
|
24
26
|
--------------------------------------------------------
|
|
25
27
|
|
|
@@ -103,6 +105,8 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
103
105
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
104
106
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
105
107
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
108
|
+
* `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_
|
|
109
|
+
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
106
110
|
|
|
107
111
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
108
112
|
:target: https://travis-ci.org/pyotp/pyotp
|
|
@@ -12,6 +12,8 @@ Authenticator <https://en.wikipedia.org/wiki/Google_Authenticator>`_, `Authy <ht
|
|
|
12
12
|
compatible app. Users can set up auth tokens in their apps easily by using their phone camera to scan `otpauth://
|
|
13
13
|
<https://github.com/google/google-authenticator/wiki/Key-Uri-Format>`_ QR codes provided by PyOTP.
|
|
14
14
|
|
|
15
|
+
We recommend that implementers read the `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_ and `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of authentication best practices.
|
|
16
|
+
|
|
15
17
|
Quick overview of using One Time Passwords on your phone
|
|
16
18
|
--------------------------------------------------------
|
|
17
19
|
|
|
@@ -95,6 +97,8 @@ Links
|
|
|
95
97
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
96
98
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
97
99
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
100
|
+
* `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_
|
|
101
|
+
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
98
102
|
|
|
99
103
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
100
104
|
:target: https://travis-ci.org/pyotp/pyotp
|
pyotp-2.2.4/setup.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from setuptools import setup
|
|
5
|
+
|
|
6
|
+
install_requires = [line.rstrip() for line in open(os.path.join(os.path.dirname(__file__), "requirements.txt"))]
|
|
7
|
+
|
|
8
|
+
setup(
|
|
9
|
+
name="pyotp",
|
|
10
|
+
version="2.2.4",
|
|
11
|
+
url="https://github.com/pyotp/pyotp",
|
|
12
|
+
license="BSD License",
|
|
13
|
+
author="PyOTP contributors",
|
|
14
|
+
author_email="kislyuk@gmail.com",
|
|
15
|
+
description="Python One Time Password Library",
|
|
16
|
+
long_description=open("README.rst").read(),
|
|
17
|
+
install_requires=install_requires,
|
|
18
|
+
packages=["pyotp"],
|
|
19
|
+
package_dir={"": "src"},
|
|
20
|
+
platforms=["MacOS X", "Posix"],
|
|
21
|
+
zip_safe=False,
|
|
22
|
+
test_suite="test",
|
|
23
|
+
classifiers=[
|
|
24
|
+
"Intended Audience :: Developers",
|
|
25
|
+
"License :: OSI Approved :: BSD License",
|
|
26
|
+
"Operating System :: MacOS :: MacOS X",
|
|
27
|
+
"Operating System :: POSIX",
|
|
28
|
+
"Programming Language :: Python",
|
|
29
|
+
"Programming Language :: Python :: 2.7",
|
|
30
|
+
"Programming Language :: Python :: 3.3",
|
|
31
|
+
"Programming Language :: Python :: 3.4",
|
|
32
|
+
"Topic :: Software Development :: Libraries :: Python Modules"
|
|
33
|
+
]
|
|
34
|
+
)
|
|
@@ -46,7 +46,7 @@ def build_uri(secret, name, initial_count=None, issuer_name=None,
|
|
|
46
46
|
is_period_set = (period is not None and period != 30)
|
|
47
47
|
|
|
48
48
|
otp_type = 'hotp' if is_initial_count_present else 'totp'
|
|
49
|
-
base_uri = 'otpauth://{}/{}?{}'
|
|
49
|
+
base_uri = 'otpauth://{0}/{1}?{2}'
|
|
50
50
|
|
|
51
51
|
url_args = {'secret': secret}
|
|
52
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyotp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Python One Time Password Library
|
|
5
5
|
Home-page: https://github.com/pyotp/pyotp
|
|
6
6
|
Author: PyOTP contributors
|
|
@@ -20,6 +20,8 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
20
20
|
compatible app. Users can set up auth tokens in their apps easily by using their phone camera to scan `otpauth://
|
|
21
21
|
<https://github.com/google/google-authenticator/wiki/Key-Uri-Format>`_ QR codes provided by PyOTP.
|
|
22
22
|
|
|
23
|
+
We recommend that implementers read the `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_ and `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of authentication best practices.
|
|
24
|
+
|
|
23
25
|
Quick overview of using One Time Passwords on your phone
|
|
24
26
|
--------------------------------------------------------
|
|
25
27
|
|
|
@@ -103,6 +105,8 @@ Description: PyOTP - The Python One-Time Password Library
|
|
|
103
105
|
* `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
|
|
104
106
|
* `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
|
|
105
107
|
* `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
|
|
108
|
+
* `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_
|
|
109
|
+
* `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
|
|
106
110
|
|
|
107
111
|
.. image:: https://img.shields.io/travis/pyotp/pyotp.svg
|
|
108
112
|
:target: https://travis-ci.org/pyotp/pyotp
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
|
5
5
|
|
|
6
|
-
import base64
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import os
|
|
10
|
-
import sys
|
|
11
|
-
import unittest
|
|
6
|
+
import base64, datetime, hashlib, os, sys, unittest
|
|
7
|
+
from warnings import warn
|
|
8
|
+
|
|
12
9
|
try:
|
|
13
10
|
from urllib.parse import urlparse, parse_qsl
|
|
14
11
|
except ImportError:
|
|
@@ -137,9 +134,9 @@ class TOTPExampleValuesFromTheRFC(unittest.TestCase):
|
|
|
137
134
|
for digest, secret in self.RFC_VALUES:
|
|
138
135
|
totp = pyotp.TOTP(base64.b32encode(secret), 8, digest)
|
|
139
136
|
for utime, code in self.RFC_VALUES[(digest, secret)]:
|
|
140
|
-
# 32-bit platforms use native functions to handle timestamps, so they fail this test
|
|
141
|
-
# (and will fail after 19 January 2038)
|
|
142
137
|
if utime > sys.maxsize:
|
|
138
|
+
warn("32-bit platforms use native functions to handle timestamps, so they fail this test" +
|
|
139
|
+
" (and will fail after 19 January 2038)")
|
|
143
140
|
continue
|
|
144
141
|
value = totp.at(utime)
|
|
145
142
|
msg = "%s != %s (%s, time=%d)"
|
pyotp-2.2.1/setup.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
|
|
3
|
-
import os
|
|
4
|
-
from setuptools import setup
|
|
5
|
-
|
|
6
|
-
install_requires = [line.rstrip() for line in open(os.path.join(os.path.dirname(__file__), "requirements.txt"))]
|
|
7
|
-
|
|
8
|
-
setup(
|
|
9
|
-
name='pyotp',
|
|
10
|
-
version='2.2.1',
|
|
11
|
-
url='https://github.com/pyotp/pyotp',
|
|
12
|
-
license='BSD License',
|
|
13
|
-
author='PyOTP contributors',
|
|
14
|
-
author_email='kislyuk@gmail.com',
|
|
15
|
-
description='Python One Time Password Library',
|
|
16
|
-
long_description=open('README.rst').read(),
|
|
17
|
-
install_requires=install_requires,
|
|
18
|
-
packages=['pyotp'],
|
|
19
|
-
package_dir={'': 'src'},
|
|
20
|
-
platforms=['MacOS X', 'Posix'],
|
|
21
|
-
zip_safe=False,
|
|
22
|
-
test_suite="test",
|
|
23
|
-
classifiers=[
|
|
24
|
-
'Intended Audience :: Developers',
|
|
25
|
-
'License :: OSI Approved :: BSD License',
|
|
26
|
-
'Operating System :: MacOS :: MacOS X',
|
|
27
|
-
'Operating System :: POSIX',
|
|
28
|
-
'Programming Language :: Python',
|
|
29
|
-
'Programming Language :: Python :: 2.7',
|
|
30
|
-
'Programming Language :: Python :: 3.3',
|
|
31
|
-
'Programming Language :: Python :: 3.4',
|
|
32
|
-
'Topic :: Software Development :: Libraries :: Python Modules'
|
|
33
|
-
]
|
|
34
|
-
)
|
|
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
|