pyramid-fullauth 0.5.0__py2.7.egg → 0.6.0__py2.7.egg

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.
Files changed (93) hide show
  1. EGG-INFO/PKG-INFO +21 -10
  2. EGG-INFO/SOURCES.txt +2 -0
  3. EGG-INFO/requires.txt +9 -6
  4. pyramid_fullauth/__init__.py +2 -2
  5. pyramid_fullauth/__init__.pyc +0 -0
  6. pyramid_fullauth/auth.py +3 -3
  7. pyramid_fullauth/auth.pyc +0 -0
  8. pyramid_fullauth/compat.py +3 -1
  9. pyramid_fullauth/compat.pyc +0 -0
  10. pyramid_fullauth/config/default.yaml +1 -1
  11. pyramid_fullauth/events.py +1 -19
  12. pyramid_fullauth/events.pyc +0 -0
  13. pyramid_fullauth/exceptions.py +1 -7
  14. pyramid_fullauth/exceptions.pyc +0 -0
  15. pyramid_fullauth/models/__init__.py +2 -4
  16. pyramid_fullauth/models/__init__.pyc +0 -0
  17. pyramid_fullauth/models/extensions/__init__.py +0 -1
  18. pyramid_fullauth/models/extensions/__init__.pyc +0 -0
  19. pyramid_fullauth/models/mixins/__init__.py +3 -2
  20. pyramid_fullauth/models/mixins/__init__.pyc +0 -0
  21. pyramid_fullauth/models/mixins/email.py +5 -4
  22. pyramid_fullauth/models/mixins/email.pyc +0 -0
  23. pyramid_fullauth/models/mixins/password.py +5 -11
  24. pyramid_fullauth/models/mixins/password.pyc +0 -0
  25. pyramid_fullauth/request.py +1 -1
  26. pyramid_fullauth/request.pyc +0 -0
  27. pyramid_fullauth/resources/templates/403.mako +1 -1
  28. pyramid_fullauth/resources/templates/_form.login.mako +1 -1
  29. pyramid_fullauth/resources/templates/_form.register.mako +1 -1
  30. pyramid_fullauth/resources/templates/_social.login.mako +1 -1
  31. pyramid_fullauth/resources/templates/activate.mako +1 -1
  32. pyramid_fullauth/resources/templates/email_change.mako +1 -1
  33. pyramid_fullauth/resources/templates/layout.mako +1 -1
  34. pyramid_fullauth/resources/templates/login.mako +1 -1
  35. pyramid_fullauth/resources/templates/register.mako +1 -1
  36. pyramid_fullauth/resources/templates/reset.mako +1 -1
  37. pyramid_fullauth/resources/templates/reset.proceed.mako +1 -1
  38. pyramid_fullauth/routing/__init__.py +1 -1
  39. pyramid_fullauth/routing/__init__.pyc +0 -0
  40. pyramid_fullauth/routing/predicates.py +4 -3
  41. pyramid_fullauth/routing/predicates.pyc +0 -0
  42. pyramid_fullauth/tools.py +1 -1
  43. pyramid_fullauth/tools.pyc +0 -0
  44. pyramid_fullauth/views/__init__.py +2 -3
  45. pyramid_fullauth/views/__init__.pyc +0 -0
  46. pyramid_fullauth/views/basic/__init__.py +1 -1
  47. pyramid_fullauth/views/basic/__init__.pyc +0 -0
  48. pyramid_fullauth/views/basic/activate.py +1 -2
  49. pyramid_fullauth/views/basic/activate.pyc +0 -0
  50. pyramid_fullauth/views/basic/forbidden.py +1 -2
  51. pyramid_fullauth/views/basic/forbidden.pyc +0 -0
  52. pyramid_fullauth/views/basic/login.py +22 -28
  53. pyramid_fullauth/views/basic/login.pyc +0 -0
  54. pyramid_fullauth/views/basic/logout.py +1 -2
  55. pyramid_fullauth/views/basic/logout.pyc +0 -0
  56. pyramid_fullauth/views/basic/profile/__init__.py +1 -1
  57. pyramid_fullauth/views/basic/profile/__init__.pyc +0 -0
  58. pyramid_fullauth/views/basic/profile/email.py +43 -37
  59. pyramid_fullauth/views/basic/profile/email.pyc +0 -0
  60. pyramid_fullauth/views/basic/profile/password.py +1 -3
  61. pyramid_fullauth/views/basic/profile/password.pyc +0 -0
  62. pyramid_fullauth/views/basic/register.py +49 -24
  63. pyramid_fullauth/views/basic/register.pyc +0 -0
  64. pyramid_fullauth/views/social.py +1 -2
  65. pyramid_fullauth/views/social.pyc +0 -0
  66. tests/__init__.pyc +0 -0
  67. tests/conftest.py +21 -9
  68. tests/conftest.pyc +0 -0
  69. tests/tools.pyc +0 -0
  70. tests/unit/test_default_settings.pyc +0 -0
  71. tests/unit/test_groupfinder.pyc +0 -0
  72. tests/unit/test_social_view.pyc +0 -0
  73. tests/unit/test_tools.pyc +0 -0
  74. tests/unit/test_user_active.pyc +0 -0
  75. tests/unit/test_user_admin.pyc +0 -0
  76. tests/unit/test_user_email.pyc +0 -0
  77. tests/unit/test_user_password.pyc +0 -0
  78. tests/unit/test_user_providers.pyc +0 -0
  79. tests/unit/test_user_repr.py +2 -2
  80. tests/unit/test_user_repr.pyc +0 -0
  81. tests/unit/test_validators.pyc +0 -0
  82. tests/views/__init__.pyc +0 -0
  83. tests/views/conftest.pyc +0 -0
  84. tests/views/test_activation.py +1 -1
  85. tests/views/test_activation.pyc +0 -0
  86. tests/views/test_email.pyc +0 -0
  87. tests/views/test_events.py +71 -16
  88. tests/views/test_events.pyc +0 -0
  89. tests/views/test_login.pyc +0 -0
  90. tests/views/test_login_social.pyc +0 -0
  91. tests/views/test_logout.pyc +0 -0
  92. tests/views/test_register.pyc +0 -0
  93. tests/views/test_reset.pyc +0 -0
EGG-INFO/PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyramid-fullauth
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: This package intends to provide full authentication / authorisation
5
5
  implementation for pyramid applications
6
6
  Home-page: https://github.com/fizyk/pyramid_fullauth
@@ -14,8 +14,8 @@ Description: pyramid_fullauth
14
14
  :target: https://pypi.python.org/pypi/pyramid_fullauth/
15
15
  :alt: Latest PyPI version
16
16
 
17
- .. image:: https://readthedocs.org/projects/pyramid_fullauth/badge/?version=v0.4.1
18
- :target: https://readthedocs.org/projects/pyramid_fullauth/?badge=v0.4.1
17
+ .. image:: https://readthedocs.org/projects/pyramid_fullauth/badge/?version=v0.6.0
18
+ :target: https://readthedocs.org/projects/pyramid_fullauth/?badge=v0.6.0
19
19
  :alt: Documentation Status
20
20
 
21
21
  .. image:: https://pypip.in/d/pyramid_fullauth/badge.png
@@ -34,21 +34,22 @@ Description: pyramid_fullauth
34
34
  :target: https://pypi.python.org/pypi/pyramid_fullauth/
35
35
  :alt: License
36
36
 
37
- Pyramid fullauth's goal is to provide full plug-in registration functionality for pyramid, with user managing
37
+ Pyramid fullauth's provides full user registration and management functionality for
38
+ `pyramid <http://docs.pylonsproject.org/en/latest/docs/pyramid.html>`_ based web applications.
38
39
 
39
40
  Package status
40
41
  --------------
41
42
 
42
- .. image:: https://travis-ci.org/fizyk/pyramid_fullauth.png?branch=v0.4.1
43
+ .. image:: https://travis-ci.org/fizyk/pyramid_fullauth.png?branch=v0.6.0
43
44
  :target: https://travis-ci.org/fizyk/pyramid_fullauth
44
45
  :alt: Tests
45
46
 
46
- .. image:: https://coveralls.io/repos/fizyk/pyramid_fullauth/badge.png?branch=v0.4.1
47
- :target: https://coveralls.io/r/fizyk/pyramid_fullauth?branch=v0.4.1
47
+ .. image:: https://coveralls.io/repos/fizyk/pyramid_fullauth/badge.png?branch=v0.6.0
48
+ :target: https://coveralls.io/r/fizyk/pyramid_fullauth?branch=v0.6.0
48
49
  :alt: Coverage Status
49
50
 
50
- .. image:: https://requires.io/github/fizyk/pyramid_fullauth/requirements.svg?tag=v0.4.1
51
- :target: https://requires.io/github/fizyk/pyramid_fullauth/requirements/?tag=v0.4.1
51
+ .. image:: https://requires.io/github/fizyk/pyramid_fullauth/requirements.svg?tag=v0.6.0
52
+ :target: https://requires.io/github/fizyk/pyramid_fullauth/requirements/?tag=v0.6.0
52
53
  :alt: Requirements Status
53
54
 
54
55
  Package resources
@@ -77,11 +78,17 @@ Description: pyramid_fullauth
77
78
  CHANGELOG
78
79
  =========
79
80
 
81
+ 0.6.0
82
+ -------
83
+
84
+ - increased the size of password and salt fields to 128 characters each
85
+ - default password hashing algorithm is sha256
86
+
80
87
  0.5.0
81
88
  -------
82
89
 
83
90
  - full python3 compatibility, since velruse migrated to py3 enabled requests-oauth
84
- -require velruse 1.1.1
91
+ - require velruse 1.1.1
85
92
  - run tests with sqlalchemy 1.0.x
86
93
  - small updates to conform with new linters versions embedded in pylama
87
94
 
@@ -196,7 +203,11 @@ Classifier: License :: OSI Approved :: MIT License
196
203
  Classifier: Natural Language :: English
197
204
  Classifier: Operating System :: OS Independent
198
205
  Classifier: Programming Language :: Python
206
+ Classifier: Programming Language :: Python :: 2
199
207
  Classifier: Programming Language :: Python :: 2.7
208
+ Classifier: Programming Language :: Python :: 3
200
209
  Classifier: Programming Language :: Python :: 3.3
201
210
  Classifier: Programming Language :: Python :: 3.4
211
+ Classifier: Programming Language :: Python :: 3.5
212
+ Classifier: Programming Language :: Python :: 3.6
202
213
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
EGG-INFO/SOURCES.txt CHANGED
@@ -1,5 +1,6 @@
1
1
  AUTHORS.rst
2
2
  CHANGES.rst
3
+ CONTRIBUTING.rst
3
4
  MANIFEST.in
4
5
  README.rst
5
6
  setup.cfg
@@ -12,6 +13,7 @@ docs/source/authors.rst
12
13
  docs/source/basic.rst
13
14
  docs/source/changelog.rst
14
15
  docs/source/conf.py
16
+ docs/source/contributing.rst
15
17
  docs/source/customise.rst
16
18
  docs/source/index.rst
17
19
  docs/source/narrative.rst
EGG-INFO/requires.txt CHANGED
@@ -1,15 +1,18 @@
1
1
  pyramid_localize
2
- pyramid >=1.4
2
+ pyramid>=1.4
3
3
  pyramid_mako
4
- tzf.pyramid_yml >=1.0
4
+ tzf.pyramid_yml>=1.0
5
5
  pyramid_basemodel>=0.3
6
+ SQLAlchemy!=1.1.0,!=1.1.1
6
7
  velruse >=1.1.1
7
8
 
8
9
  [docs]
9
10
  sphinx
10
11
 
11
12
  [tests]
12
- mock
13
- pytest_pyramid
14
- pytest-cov
15
- pytest-dbfixtures[mysql,postgresql]
13
+ mock==2.0.0
14
+ pytest==3.0.6
15
+ pytest-pyramid==0.3.0
16
+ pytest-cov==2.4.0
17
+ pytest-mysql==1.1.0
18
+ pytest-postgresql==1.2.0
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -16,7 +16,7 @@ from pyramid_fullauth.auth import groupfinder
16
16
  from pyramid_fullauth.routing import predicates
17
17
  from pyramid_fullauth.request import login_perform, logout, user
18
18
 
19
- __version__ = '0.5.0'
19
+ __version__ = '0.6.0'
20
20
 
21
21
 
22
22
  logger = logging.getLogger(__name__)
Binary file
pyramid_fullauth/auth.py CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -16,7 +16,8 @@ def groupfinder(userid, request):
16
16
  Adds **s:inactive** group to users who has not activated their account, and **s:user** group to those, who did.
17
17
  If user has is_admin flag, he gets **s:superadmin** group set
18
18
 
19
- Might be useful, when you want restrict access to some parts of your application, but still allow log in, and access to some other parts.
19
+ Might be useful, when you want restrict access to some parts of your application, but still allow log in, and
20
+ access to some other parts.
20
21
 
21
22
  :param int userid: user identity
22
23
  :param pyramid.request.Request request: request object
@@ -43,7 +44,6 @@ def groupfinder(userid, request):
43
44
 
44
45
 
45
46
  class BaseACLRootFactoryMixin(object):
46
-
47
47
  """
48
48
  ACL list factory Mixin.
49
49
 
pyramid_fullauth/auth.pyc CHANGED
Binary file
@@ -11,8 +11,10 @@ import sys
11
11
  if sys.version_info.major == 2:
12
12
  from urllib import urlencode
13
13
  from urlparse import urlparse, parse_qs
14
+ from hashlib import algorithms
14
15
  else:
15
16
  from urllib.parse import urlencode, urlparse, parse_qs
17
+ from hashlib import algorithms_guaranteed as algorithms
16
18
 
17
19
 
18
- __all__ = ('urlencode', 'urlparse', 'parse_qs')
20
+ __all__ = ('urlencode', 'urlparse', 'parse_qs', 'algorithms')
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -7,7 +7,6 @@
7
7
 
8
8
 
9
9
  class _BaseRegisterEvent(object):
10
-
11
10
  """
12
11
  Base fullauth event.
13
12
 
@@ -27,7 +26,6 @@ class _BaseRegisterEvent(object):
27
26
 
28
27
 
29
28
  class BeforeRegister(_BaseRegisterEvent):
30
-
31
29
  """
32
30
  Execute custom code at the start of registration process.
33
31
 
@@ -50,7 +48,6 @@ class BeforeRegister(_BaseRegisterEvent):
50
48
 
51
49
 
52
50
  class AfterRegister(_BaseRegisterEvent):
53
-
54
51
  """
55
52
  Add custom post-processing code in registration process.
56
53
 
@@ -82,7 +79,6 @@ class AfterRegister(_BaseRegisterEvent):
82
79
 
83
80
 
84
81
  class AfterActivate(_BaseRegisterEvent):
85
-
86
82
  """
87
83
  Add custom post-processing logic after user gets activated.
88
84
 
@@ -95,7 +91,6 @@ class AfterActivate(_BaseRegisterEvent):
95
91
 
96
92
 
97
93
  class AfterResetRequest(_BaseRegisterEvent):
98
-
99
94
  """
100
95
  Add custom post-processing after user sends request to reset password.
101
96
 
@@ -108,14 +103,12 @@ class AfterResetRequest(_BaseRegisterEvent):
108
103
 
109
104
 
110
105
  class BeforeReset(_BaseRegisterEvent):
111
-
112
106
  """Add custom pre-processing before the actual reset-password process."""
113
107
 
114
108
  pass
115
109
 
116
110
 
117
111
  class AfterReset(_BaseRegisterEvent):
118
-
119
112
  """
120
113
  Add custom post-processing after the actual reset-password process.
121
114
 
@@ -128,7 +121,6 @@ class AfterReset(_BaseRegisterEvent):
128
121
 
129
122
 
130
123
  class AlreadyLoggedIn(object):
131
-
132
124
  """
133
125
  Allow execute custom logic, when logged in user tries to log in again.
134
126
 
@@ -148,7 +140,6 @@ class AlreadyLoggedIn(object):
148
140
 
149
141
 
150
142
  class BeforeLogIn(_BaseRegisterEvent):
151
-
152
143
  """
153
144
  Add custom logic before user gets logged in.
154
145
 
@@ -162,7 +153,6 @@ class BeforeLogIn(_BaseRegisterEvent):
162
153
 
163
154
 
164
155
  class AfterLogIn(_BaseRegisterEvent):
165
-
166
156
  """Add custom logic after user logs in."""
167
157
 
168
158
  pass
@@ -173,7 +163,6 @@ class AfterLogIn(_BaseRegisterEvent):
173
163
 
174
164
 
175
165
  class _BaseSocialRegister(_BaseRegisterEvent):
176
-
177
166
  """Base for all social requests."""
178
167
 
179
168
  def __init__(self, request, user, profile):
@@ -189,14 +178,12 @@ class _BaseSocialRegister(_BaseRegisterEvent):
189
178
 
190
179
 
191
180
  class BeforeSocialRegister(_BaseSocialRegister):
192
-
193
181
  """Adds custom logic before the social login process start."""
194
182
 
195
183
  pass
196
184
 
197
185
 
198
186
  class AfterSocialRegister(_BaseSocialRegister):
199
-
200
187
  """
201
188
  Add custom logic after user registers through social network.
202
189
 
@@ -219,7 +206,6 @@ class AfterSocialRegister(_BaseSocialRegister):
219
206
 
220
207
 
221
208
  class AfterSocialLogIn(_BaseSocialRegister):
222
-
223
209
  """
224
210
  Custom logic after user logs in through social network.
225
211
 
@@ -232,7 +218,6 @@ class AfterSocialLogIn(_BaseSocialRegister):
232
218
 
233
219
 
234
220
  class SocialAccountAlreadyConnected(_BaseSocialRegister):
235
-
236
221
  """
237
222
  Event raised when social account is already connected to some other user.
238
223
 
@@ -260,21 +245,18 @@ class SocialAccountAlreadyConnected(_BaseSocialRegister):
260
245
 
261
246
 
262
247
  class BeforeEmailChange(_BaseRegisterEvent):
263
-
264
248
  """Allow to add custom validation (like checking password) before email change process."""
265
249
 
266
250
  pass
267
251
 
268
252
 
269
253
  class AfterEmailChange(_BaseRegisterEvent):
270
-
271
254
  """Allow to add some custom post-processing, like e-mail sending, after email change process."""
272
255
 
273
256
  pass
274
257
 
275
258
 
276
259
  class AfterEmailChangeActivation(_BaseRegisterEvent):
277
-
278
260
  """Allow to add custom logic, after changed email had been activated."""
279
261
 
280
262
  pass
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -6,42 +6,36 @@
6
6
 
7
7
 
8
8
  class DeleteException(Exception):
9
-
10
9
  """Exception risen when the user can't be deleted."""
11
10
 
12
11
  pass
13
12
 
14
13
 
15
14
  class ValidateError(ValueError):
16
-
17
15
  """Base of every validate error in pyramid_fullauth."""
18
16
 
19
17
  pass
20
18
 
21
19
 
22
20
  class EmptyError(ValidateError):
23
-
24
21
  """Thrown whenever user is trying to set empty value."""
25
22
 
26
23
  pass
27
24
 
28
25
 
29
26
  class ShortPasswordError(ValidateError):
30
-
31
27
  """Thrown when password doesn't meet the length requirement."""
32
28
 
33
29
  pass
34
30
 
35
31
 
36
32
  class PasswordConfirmMismatchError(ValidateError):
37
-
38
33
  """Thrown when there's a mismatch with cpassword_confirm."""
39
34
 
40
35
  pass
41
36
 
42
37
 
43
38
  class EmailValidationError(ValidateError):
44
-
45
39
  """Exception thrown, when there's incorrect email provided."""
46
40
 
47
41
  pass
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -24,7 +24,6 @@ from pyramid_fullauth.models.mixins import UserPasswordMixin, UserEmailMixin
24
24
 
25
25
 
26
26
  class User(UserPasswordMixin, UserEmailMixin, Base):
27
-
28
27
  """User object."""
29
28
 
30
29
  __tablename__ = 'users'
@@ -153,7 +152,6 @@ class User(UserPasswordMixin, UserEmailMixin, Base):
153
152
 
154
153
 
155
154
  class Group(Base):
156
-
157
155
  """User group object."""
158
156
 
159
157
  __tablename__ = 'groups'
@@ -166,7 +164,6 @@ class Group(Base):
166
164
 
167
165
 
168
166
  class AuthenticationProvider(Base):
169
-
170
167
  """Model to store authentication methods for different providers."""
171
168
 
172
169
  __tablename__ = 'user_authentication_provider'
@@ -181,6 +178,7 @@ class AuthenticationProvider(Base):
181
178
 
182
179
  user = relationship(User, backref='providers')
183
180
 
181
+
184
182
  #: Association table between User and Group models.
185
183
  user_group = Table(
186
184
  'users_groups',
Binary file
@@ -12,7 +12,6 @@ from pyramid.compat import string_types
12
12
 
13
13
 
14
14
  class CaseInsensitive(Comparator):
15
-
16
15
  """Hybrid value representing a lower case representation."""
17
16
 
18
17
  def __init__(self, word):
@@ -1,9 +1,10 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
5
+ """Mixin's main module."""
5
6
 
6
7
  from pyramid_fullauth.models.mixins.password import UserPasswordMixin
7
8
  from pyramid_fullauth.models.mixins.email import UserEmailMixin
8
9
 
9
- __all__ = (UserPasswordMixin, UserEmailMixin)
10
+ __all__ = ('UserPasswordMixin', 'UserEmailMixin')
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -20,11 +20,11 @@ pattern_mail = re.compile(
20
20
  # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
21
21
  r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177 ]|\\[\001-\011\013\014\016-\177 ]){0,256}"'
22
22
  r')@((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2}\.?)$)' # domain
23
- r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE) # literal form, ipv4 address (SMTP 4.1.3)
23
+ # literal form, ipv4 address (SMTP 4.1.3)
24
+ r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)
24
25
 
25
26
 
26
27
  class UserEmailMixin(object):
27
-
28
28
  """User email fields and functionality."""
29
29
 
30
30
  __pattern_mail = pattern_mail
@@ -87,7 +87,8 @@ class UserEmailMixin(object):
87
87
 
88
88
  .. note::
89
89
 
90
- See pyramid docs about `simple validators <http://docs.sqlalchemy.org/en/latest/orm/mapper_config.html#simple-validators>`_
90
+ See pyramid docs about
91
+ `simple validators <http://docs.sqlalchemy.org/en/latest/orm/mapper_config.html#simple-validators>`_
91
92
 
92
93
  :param str key: field key
93
94
  :param str address: email address
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -15,28 +15,22 @@ from sqlalchemy import String
15
15
  from sqlalchemy.orm import validates
16
16
  from pyramid.compat import text_type
17
17
  from pyramid_fullauth.exceptions import EmptyError
18
-
19
- try: # pragma: no cover
20
- algorithms = hashlib.algorithms
21
- except AttributeError: # pragma: no cover
22
- # Simple tuple for Python 2.6
23
- algorithms = ('md5', 'sha1')
18
+ from pyramid_fullauth.compat import algorithms
24
19
 
25
20
 
26
21
  class UserPasswordMixin(object):
27
-
28
22
  """Authentication field definition along with appropriate methods."""
29
23
 
30
24
  #: password field
31
- password = Column(Unicode(40), nullable=False)
25
+ password = Column(Unicode(128), nullable=False)
32
26
 
33
27
  #: hash_algorithm field
34
28
  _hash_algorithm = Column('hash_algorithm',
35
29
  Enum(*algorithms, name="hash_algorithms_enum"),
36
- default=text_type('sha1'), nullable=False)
30
+ default=text_type('sha256'), nullable=False)
37
31
 
38
32
  #: salt field
39
- _salt = Column('salt', Unicode(50), nullable=False)
33
+ _salt = Column('salt', Unicode(128), nullable=False)
40
34
 
41
35
  #: reset key field
42
36
  reset_key = Column(String(255), unique=True)
Binary file
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
Binary file
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,6 +1,6 @@
1
1
  ## -*- coding: utf-8 -*-
2
2
  <%doc>
3
- Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
3
+ Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
4
4
 
5
5
  This module is part of pyramid_fullauth and is released under
6
6
  the MIT License (MIT): http://opensource.org/licenses/MIT
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013 - 2014 by pyramid_fullauth authors and contributors <see AUTHORS file>
1
+ # Copyright (c) 2013 - 2016 by pyramid_fullauth authors and contributors <see AUTHORS file>
2
2
  #
3
3
  # This module is part of pyramid_fullauth and is released under
4
4
  # the MIT License (MIT): http://opensource.org/licenses/MIT
Binary file