PyOTP 2.2.5__py2.py3-none-any.whl → 2.2.6__py2.py3-none-any.whl

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/hotp.py CHANGED
@@ -34,9 +34,10 @@ class HOTP(OTP):
34
34
  """
35
35
  Returns the provisioning URI for the OTP. This can then be
36
36
  encoded in a QR Code and used to provision an OTP app like
37
- Google Authenticator. See
38
- https://github.com/google/google-authenticator/wiki/Key-Uri-Format
39
- for more details.
37
+ Google Authenticator.
38
+
39
+ See also:
40
+ https://github.com/google/google-authenticator/wiki/Key-Uri-Format
40
41
 
41
42
  :param name: name of the user account
42
43
  :type name: str
pyotp/totp.py CHANGED
@@ -71,9 +71,10 @@ class TOTP(OTP):
71
71
  """
72
72
  Returns the provisioning URI for the OTP. This can then be
73
73
  encoded in a QR Code and used to provision an OTP app like
74
- Google Authenticator. See
75
- https://github.com/google/google-authenticator/wiki/Key-Uri-Format
76
- for more details.
74
+ Google Authenticator.
75
+
76
+ See also:
77
+ https://github.com/google/google-authenticator/wiki/Key-Uri-Format
77
78
 
78
79
  :param name: name of the user account
79
80
  :type name: str
pyotp/utils.py CHANGED
@@ -61,7 +61,7 @@ def build_uri(secret, name, initial_count=None, issuer_name=None,
61
61
  label = quote(name)
62
62
  if issuer_name is not None:
63
63
  label = quote(issuer_name) + ':' + label
64
- url_args['issuer'] = quote(issuer_name)
64
+ url_args['issuer'] = issuer_name
65
65
 
66
66
  if is_initial_count_present:
67
67
  url_args['counter'] = initial_count
@@ -72,7 +72,7 @@ def build_uri(secret, name, initial_count=None, issuer_name=None,
72
72
  if is_period_set:
73
73
  url_args['period'] = period
74
74
 
75
- uri = base_uri.format(otp_type, label, urlencode(url_args))
75
+ uri = base_uri.format(otp_type, label, urlencode(url_args).replace("+", "%20"))
76
76
  return uri
77
77
 
78
78
 
@@ -19,8 +19,8 @@ Quick overview of using One Time Passwords on your phone
19
19
 
20
20
  * OTPs involve a shared secret, stored both on the phone and the server
21
21
  * OTPs can be generated on a phone without internet connectivity
22
- * OTPs should always be used as a second factor of authentication(if your phone is lost, you account is still secured with a password)
23
- * Google Authenticator allows you to store multiple OTP secrets and provision those using a QR Code(no more typing in the secret)
22
+ * OTPs should always be used as a second factor of authentication (if your phone is lost, you account is still secured with a password)
23
+ * Google Authenticator and other OTP client apps allow you to store multiple OTP secrets and provision those using a QR Code
24
24
 
25
25
  Installation
26
26
  ------------
@@ -70,11 +70,11 @@ ability to generate provisioning URIs for use with the QR Code scanner built int
70
70
 
71
71
  pyotp.totp.TOTP('JBSWY3DPEHPK3PXP').provisioning_uri("alice@google.com", issuer_name="Secure App")
72
72
 
73
- >>> 'otpauth://totp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure+App'
73
+ >>> 'otpauth://totp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure%20App'
74
74
 
75
75
  pyotp.hotp.HOTP('JBSWY3DPEHPK3PXP').provisioning_uri("alice@google.com", initial_count=0, issuer_name="Secure App")
76
76
 
77
- >>> 'otpauth://hotp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure+App&counter=0'
77
+ >>> 'otpauth://hotp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure%20App&counter=0'
78
78
 
79
79
  This URL can then be rendered as a QR Code (for example, using https://github.com/neocotic/qrious) which can then be scanned
80
80
  and added to the users list of OTP credentials.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.0
2
2
  Name: pyotp
3
- Version: 2.2.5
3
+ Version: 2.2.6
4
4
  Summary: Python One Time Password Library
5
5
  Home-page: https://github.com/pyotp/pyotp
6
6
  Author: PyOTP contributors
@@ -39,8 +39,8 @@ Quick overview of using One Time Passwords on your phone
39
39
 
40
40
  * OTPs involve a shared secret, stored both on the phone and the server
41
41
  * OTPs can be generated on a phone without internet connectivity
42
- * OTPs should always be used as a second factor of authentication(if your phone is lost, you account is still secured with a password)
43
- * Google Authenticator allows you to store multiple OTP secrets and provision those using a QR Code(no more typing in the secret)
42
+ * OTPs should always be used as a second factor of authentication (if your phone is lost, you account is still secured with a password)
43
+ * Google Authenticator and other OTP client apps allow you to store multiple OTP secrets and provision those using a QR Code
44
44
 
45
45
  Installation
46
46
  ------------
@@ -90,11 +90,11 @@ ability to generate provisioning URIs for use with the QR Code scanner built int
90
90
 
91
91
  pyotp.totp.TOTP('JBSWY3DPEHPK3PXP').provisioning_uri("alice@google.com", issuer_name="Secure App")
92
92
 
93
- >>> 'otpauth://totp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure+App'
93
+ >>> 'otpauth://totp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure%20App'
94
94
 
95
95
  pyotp.hotp.HOTP('JBSWY3DPEHPK3PXP').provisioning_uri("alice@google.com", initial_count=0, issuer_name="Secure App")
96
96
 
97
- >>> 'otpauth://hotp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure+App&counter=0'
97
+ >>> 'otpauth://hotp/Secure%20App:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Secure%20App&counter=0'
98
98
 
99
99
  This URL can then be rendered as a QR Code (for example, using https://github.com/neocotic/qrious) which can then be scanned
100
100
  and added to the users list of OTP credentials.
@@ -0,0 +1,12 @@
1
+ pyotp/__init__.py,sha256=3I4NkdbXw4iHBbtfL7-dbNv8XZn0EUzS0Fc1riI1CJ8,485
2
+ pyotp/compat.py,sha256=QVb4buImn4PyP0qe5uLiXsO2-p4ItTGl01Vbt2dILNE,222
3
+ pyotp/hotp.py,sha256=IE8W055gBBV1kQv4v7prJ_L58IvZe9mUMIcjF13pyNk,1769
4
+ pyotp/otp.py,sha256=QPyHxZ7fY7_zlrMVVveGQrCfn6gatpaHO3-ok9XwCaU,2344
5
+ pyotp/totp.py,sha256=EHnv9irTDDt2cLUIxy3w_80QaqtduAM08Xq7rU2bIm0,3168
6
+ pyotp/utils.py,sha256=yNbD4BeXUs1mv5muOwxp8dtnaqlBt4NC4ImLSjB6OGQ,3495
7
+ pyotp-2.2.6.dist-info/DESCRIPTION.rst,sha256=KI0U6tvZaxBYmlD_VyLpHeyNm5elafwC0eCMmFsfCP0,5471
8
+ pyotp-2.2.6.dist-info/METADATA,sha256=ntbqIw2lOH8-JFl68J5Fj2h6GjUjPG2aY0WNBx0FLNk,6167
9
+ pyotp-2.2.6.dist-info/RECORD,,
10
+ pyotp-2.2.6.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
11
+ pyotp-2.2.6.dist-info/metadata.json,sha256=AFaiADRx4xZYCktiIUacspllTHRVobY-tyltQMD_0Hs,825
12
+ pyotp-2.2.6.dist-info/top_level.txt,sha256=rFDgz6Sm4nbkYk6tlSRiMcJPyYdnY6LcZiAaYTxVc5k,6
@@ -1 +1 @@
1
- {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules"], "extensions": {"python.details": {"contacts": [{"email": "kislyuk@gmail.com", "name": "PyOTP contributors", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/pyotp/pyotp"}}}, "generator": "bdist_wheel (0.29.0)", "license": "BSD License", "metadata_version": "2.0", "name": "pyotp", "platform": "MacOS X", "summary": "Python One Time Password Library", "version": "2.2.5"}
1
+ {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules"], "extensions": {"python.details": {"contacts": [{"email": "kislyuk@gmail.com", "name": "PyOTP contributors", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/pyotp/pyotp"}}}, "generator": "bdist_wheel (0.29.0)", "license": "BSD License", "metadata_version": "2.0", "name": "pyotp", "platform": "MacOS X", "summary": "Python One Time Password Library", "version": "2.2.6"}
@@ -1,12 +0,0 @@
1
- pyotp/__init__.py,sha256=3I4NkdbXw4iHBbtfL7-dbNv8XZn0EUzS0Fc1riI1CJ8,485
2
- pyotp/compat.py,sha256=QVb4buImn4PyP0qe5uLiXsO2-p4ItTGl01Vbt2dILNE,222
3
- pyotp/hotp.py,sha256=BsY90HvawLuye4PuY7Q5DY0_HmR-83N1FVfwuw-SunI,1776
4
- pyotp/otp.py,sha256=QPyHxZ7fY7_zlrMVVveGQrCfn6gatpaHO3-ok9XwCaU,2344
5
- pyotp/totp.py,sha256=C734M9EaFqCFa2G0bzpJ6sW1M9bIwJj8Ib3BMuztHGE,3175
6
- pyotp/utils.py,sha256=op4qfvo-b4sE5zFeRIOW7jhC6LXXLuODjNaEFYdZh-4,3482
7
- pyotp-2.2.5.dist-info/DESCRIPTION.rst,sha256=FASDLIZAvjB-IGhzvwZRnNvFvh7KroZk0cvfezrj9JA,5471
8
- pyotp-2.2.5.dist-info/METADATA,sha256=uVlep_WEqWdYGLTAo528H7ZJI-XKCgTNCM1yHMth3co,6167
9
- pyotp-2.2.5.dist-info/RECORD,,
10
- pyotp-2.2.5.dist-info/WHEEL,sha256=o2k-Qa-RMNIJmUdIc7KU6VWR_ErNRbWNlxDIpl7lm34,110
11
- pyotp-2.2.5.dist-info/metadata.json,sha256=pG8Q257aEUFTs4h1opMfmDLYhP6Cl2RawF1ZFBOdY8M,825
12
- pyotp-2.2.5.dist-info/top_level.txt,sha256=rFDgz6Sm4nbkYk6tlSRiMcJPyYdnY6LcZiAaYTxVc5k,6
File without changes