Commit Graph

2234 Commits

Author SHA1 Message Date
Benjamin Dauvergne fcae7f2067 OpenID IdP: raise ImproperlyConfigured if it is enabled but python-openid is not installed 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 8837014932 Update local_settings.py.example 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne c43721be5e Rename environment variable DJANGO_CONFIG_FILE to AUTHENTIC2_CONFIG 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 31927d1c61 Move test_settings in the tests/ subdirectory 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 4be3b68aa8 Make a plugin from the OpenID 2.0 IdP 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 4fbcbeb322 tests: Add templates 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 72c32424de Remove include of gadjo files 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne 2949cfe390 Move authentic2 into src/ 2015-02-15 23:46:24 +01:00
Benjamin Dauvergne e2f03efda9 Remove init scripts not used anymore 2015-02-15 23:39:50 +01:00
Serghei Mihai 4e01add585 test fix 2015-02-15 22:24:53 +01:00
Serghei Mihai 809f8bd1ae registration: custom save method added 2015-02-15 22:24:46 +01:00
Serghei Mihai ec69ab2ceb removed modules import fixed 2015-02-15 21:55:21 +01:00
Serghei Mihai a8fd23b249 Merge branch 'wip/registration'
Conflicts:
	authentic2/auth2_auth/auth2_ssl/views.py
	authentic2/registration_backend/forms.py
	authentic2/registration_backend/urls.py
	authentic2/registration_backend/views.py
	authentic2/tests.py
	authentic2/utils.py
2015-02-15 21:42:09 +01:00
Thomas NOËL 3a83a644c2 remove cache on metadata view (#6487) 2015-02-12 14:36:40 +01:00
Serghei Mihai 262a8a1524 boolean attributes convertered to unicode and lower-cased and the other converted to unicode
Closes #6376
2015-02-05 15:55:48 +01:00
Benjamin Dauvergne 6a168d2040 middleware: allow other view restrictions from plugins 2015-02-04 16:42:35 +01:00
Benjamin Dauvergne 6ba68b5531 ldap_backend: add a new backend LDAPBAckendPasswordLost for use by lost passwords views
This backend can authenticate a user given an existing Django user mode. It allows
to retrieve adapted user (for example an LDAPUser in this case) using the
link between the Django user model and its LDAP record.
2015-02-03 15:46:56 +01:00
Benjamin Dauvergne 98ddc4bf2b ldap_backend: move all initialization of the password in LDAPUser.ldap_init() 2015-02-03 15:45:55 +01:00
Benjamin Dauvergne 8aebe1e972 ldap_backend: ignore `user_basedn` if it's empty or None 2015-02-03 15:43:24 +01:00
Benjamin Dauvergne 7c3ef42654 ldap_backend: remove the uri parameter to the return*user class of functions
uri was unused.
2015-02-03 15:42:54 +01:00
Benjamin Dauvergne 6359ac9dbd ldap_password: if no password is stored, LDAPUser.get_connection() should return the default connection 2015-02-03 15:42:18 +01:00
Benjamin Dauvergne 70aaa6b6a4 ldap_backend: do not raise if LDAPUser.get_password() fails, returns None 2015-02-03 15:41:52 +01:00
Benjamin Dauvergne 5c07c39307 ldap_backend: reimplement password change
Now it uses the password change extended
operation, it can be deactivated by setting 'use_password_modify' to False
or if 'active_directory' is True.

On AD if the old password is not passed to the modify_password() function,
and LDAP replace is used instead of a delete followed by an add.
2015-02-03 15:41:21 +01:00
Benjamin Dauvergne 954de2e4ee models_backend: abandon if username if empty or None 2015-02-03 15:37:07 +01:00
Benjamin Dauvergne dd03347857 manager: add missing template user_edit.html
It's missing from commit c516cadb0
2015-01-30 18:32:32 +01:00
Benjamin Dauvergne 6adba07e8a auth_frontends: add an exponential retry timeout after authentication
Duration is computed as DURATION*FACTOR**number_of_tries until it reach
the value MAX_DURATION, it's parametrized by the following settings:
 - A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_DURATION
 - A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_FACTOR
 - A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_MAX_DURATION

Javascript decreases the number of seconds to wait in the error message,
removing it when the delay expire.
2015-01-30 14:12:15 +01:00
Benjamin Dauvergne 39a9d42315 implement an object to compute exponential retry timeout 2015-01-30 14:10:14 +01:00
Benjamin Dauvergne 9a6224b9c3 utils: add form_add_error an helper method to set a global error on a form 2015-01-30 14:10:14 +01:00
Benjamin Dauvergne 984f98f009 backends: signal if login with an account failed more than n times
The failure count must be set in A2_LOGIN_FAILURE_COUNT_BEFORE_WARNING.
2015-01-30 14:10:14 +01:00
Benjamin Dauvergne 9014877daf middleware: permit logout event a view restriction is applied 2015-01-29 18:30:59 +01:00
Benjamin Dauvergne d98d55ca9e locale: update french translation 2015-01-29 18:19:32 +01:00
Benjamin Dauvergne c516cadb01 manager: add buttons to force user to reset its password on next login 2015-01-29 18:13:56 +01:00
Benjamin Dauvergne 6cf91d2d1a middleware: implement restriction to the password change view when password reset is requested 2015-01-29 18:13:56 +01:00
Benjamin Dauvergne d8ffeaa9e9 registration: add a next URL parameter to the password change view 2015-01-29 18:12:38 +01:00
Benjamin Dauvergne a6d7e9e70f forms: new form mixin to store next URL parameter in forms 2015-01-29 18:12:38 +01:00
Benjamin Dauvergne 3dd3106dfd utils: new helper method redirect_and_come_back to redirect to a view passing it the current URL as the next parameter 2015-01-29 18:12:38 +01:00
Benjamin Dauvergne 597d7635c0 admin: register PasswordReset in the admin application 2015-01-29 18:12:37 +01:00
Benjamin Dauvergne 91a1f082e9 models: add __unicode__ method to PasswordReset 2015-01-29 18:12:37 +01:00
Benjamin Dauvergne 59f3e12d69 fix_user_model: dispatch monkey patching of user related models and forms in their respective files
Doing it in the setting file created import loops.
2015-01-29 18:10:35 +01:00
Benjamin Dauvergne 3c61e02c02 tests: add tests on the password validator 2015-01-29 13:53:38 +01:00
Benjamin Dauvergne 62de7517ed validators: make possible to validate password using a regular expression 2015-01-29 13:53:38 +01:00
Benjamin Dauvergne 43d9d45e35 validators: add digits as a character class when validating passwords 2015-01-29 13:53:37 +01:00
Benjamin Dauvergne b0b5bcec0b ctl: do not consider --help as an invalid option 2015-01-29 11:35:58 +01:00
Benjamin Dauvergne 5d74ae70c8 Fix error in call to parent implementation 2015-01-26 18:10:04 +01:00
Serghei Mihai 81ca01d037 handling metadata from the web 2015-01-25 23:41:28 +01:00
Benjamin Dauvergne a89df5f60a In the admin allow filtering provider by their policy, remove protocol conformance column from the listing 2015-01-23 14:50:16 +01:00
Benjamin Dauvergne 1823cb1047 Set on_delete attribute on foreign keys of the saml application's models
Providers should not be deleted because their policy has been removed.
2015-01-23 14:50:07 +01:00
Benjamin Dauvergne 7b066c2b28 Fix missing import 2015-01-23 14:49:10 +01:00
Benjamin Dauvergne ba4d5e3ed2 ldap: remove reference to undefined variable
Introduced in

   commit c984435a57
   Author: Serghei MIHAI <smihai@entrouvert.com>
   Date:   Wed Jan 7 11:22:12 2015 +0100

    ldap_backend: username computed from uid by default
2015-01-22 12:26:52 +01:00
Benjamin Dauvergne d2a356aaa0 ldap: do not retrieve attributes in the base search for users 2015-01-22 12:26:52 +01:00