Commit Graph

2244 Commits

Author SHA1 Message Date
Benjamin Dauvergne 62e351cf1b Update idp_openid with new redirect helpers 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 84124024f1 Remove legacy redirect_to_login helper method 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne d58ddf28ed Use new helper methods in decorators 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 822ab9ab99 Use new helper methods in default login/password authentication frontend 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne e86916dc5c Use new helper method in auth2_ssl 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 6c72edf3e9 Add helper method to require a login 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 67e2c2d63c Add helper method for logging in an user doing all needed bookkeeping 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne b9f5b1bc08 Add helper method to record an authentication event 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 072df70c79 Add helper method to redirect user to next URL 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne c1dd7700c7 Add helper method to request a login, copying nonce and next parameters 2015-01-15 14:59:34 +01:00
Benjamin Dauvergne 2676e6f980 Add new utilities to help building URLs with parameters
Three new fucntions in authentic2.utils:
- resolve_url(), copied from Django 1.7
- make_url(), to build URLs eventually by keeping parameters from a
	request or adding new ones and using resolve_url() to find the URL
- redirect(), equivalent to django.shortcuts.redirect() but with the
	make_url() features added.
2015-01-15 14:59:34 +01:00
Benjamin Dauvergne e57015b0eb Make the logout set a cookie to let other views know that a logout occured recently
Default timeout for this cookie is 60 seconds. Fixes #6021.
2015-01-15 14:35:03 +01:00
Benjamin Dauvergne 65058bea9d Distribute locale for SAML 2.0 IdP 2015-01-15 11:12:05 +01:00
Benjamin Dauvergne 3ea847e3fa Default to use starttls on ldap:// connections, also allow to set python-ldap options locally or globally (fixes #6097) 2015-01-14 15:20:42 +01:00
Benjamin Dauvergne 0b2e5c1ad3 Fix error logging when an exception occur during admin bind in LDAP backend (fixes #6036) 2015-01-09 12:23:01 +01:00
Benjamin Dauvergne 7a7870cee2 Use a second field for confirmation of emails, not a special widget
fixes #6159
2015-01-09 11:56:15 +01:00
Benjamin Dauvergne 542c806b99 idp/saml: use get_sp_options_policy() to get the policy in get_attribute_definitions
fixes #6262
2015-01-08 18:43:12 +01:00
Frédéric Péters 7ba9603958 trivial: fix typo in error message (#6203) 2015-01-05 15:58:43 +01:00
Benjamin Dauvergne b564e15b67 Always show the login page
fixes #6145
2014-12-16 17:11:56 +01:00
Benjamin Dauvergne 72f6433463 Validate email domain containing non ASCII characters
fixes #6119
2014-12-12 19:20:57 +01:00
Benjamin Dauvergne 58d827d4ec Add Django 1.7 environment to tox configuration
fixes #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne bf4754d5b7 Run tox as part of the continuous integration script, stop the script on any error
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne 0c364453a1 Add default value to test_setting to accomodate needs of Django tests
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne c498ab7c30 Add setting A2_VALIDATE_EMAIL_DOMAIN to completely disable email domain checking
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne 956a520a3f Create a base_no_sekizai.html base template for 404 and 500 templates as they are used by Django tests which do not install django-sekizai
refs #5244
2014-12-11 14:33:49 +01:00
Grigi a17812bd55 changed mimetype to content_type as per django1.5 deprecation rules.
License: MIT

refs #5244
2014-12-11 14:33:49 +01:00
Grigi 8cb6fa6f5d changed .raw_post_data to .body as per django1.4 deprecation rules.
License: MIT

refs #5244
2014-12-11 14:33:49 +01:00
Grigi e2213b9bda Added tox as a test-runner.
It will build different virtualenvs for each target.
getlasso.sh is somewhat hacky, but until lasso is installable through pip this is the workaround.

License: MIT

refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne 242815a15e [django-1.6] add default value to all BooleanField missing it
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne 266e6ed961 [django-1.6] LDAPUser application cannot be deduced without a Meta.app_label
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne f72155c8c0 [django-1.6] authentication backends import path must match the canonical __module__.__class__
refs #5244
2014-12-11 14:33:49 +01:00
Benjamin Dauvergne 010b922103 [django-1.6] use ATOMIC_REQUESTS setting instead of TransactionMiddleware
Also remove all use of commit_on_success decorator which is useless
since all requests are atomic.

refs #5244
2014-12-11 14:33:48 +01:00
Benjamin Dauvergne b3def63aeb [django-1.6] middleware: do not store set() object in sessions only lists
refs #5244
2014-12-11 14:33:48 +01:00
Benjamin Dauvergne e031cab52b [django-1.6] adapt to API change on EmailValidator
keep local implementation backward compatible with Django < 1.6

refs #5244
2014-12-11 14:33:48 +01:00
Benjamin Dauvergne c2e98e1a74 [django-1.6] fix import path of FieldDoesNotExist exception
refs #5244
2014-12-11 14:33:48 +01:00
Mikaël Ates 9f377351a9 documentation: fix block of code displays in quick ldap backend file. 2014-12-09 17:02:00 +01:00
Frédéric Péters 92edfa2d54 misc: minor change to French translation (#6124) 2014-12-09 06:16:17 +01:00
Benjamin Dauvergne 95d9e48594 Fix bug introduced in commit 52f380d 2014-12-09 00:06:09 +01:00
Mikaël Ates 6e3622dd35 documentation: update mapping subject of attribute management. 2014-12-08 20:05:17 +01:00
Benjamin Dauvergne 92af1ff9ab Prevent circular imports of settings 2014-12-08 00:04:54 +01:00
Benjamin Dauvergne ed8bab6a81 NEw experimental attribute source computed_targeted_id to create eduPersonTargetedId like values from existing attributes 2014-12-06 03:17:56 +01:00
Benjamin Dauvergne 7467d3d810 Do not block on failure of the topological sort of attribute sources by their dependencies 2014-12-06 02:22:09 +01:00
Benjamin Dauvergne 52f380da18 Refactor SAML 2.0 IdP and attributes engine interface
- name of the SAML 2.0 service provider is passed in the 'service'
	attribute
- list of wanted attributes is passed in the '__wanted_attributes'
	attribute
2014-12-06 00:22:16 +01:00
Benjamin Dauvergne 7b43fa422b bump release to 2.1.11 2014-12-05 14:27:10 +01:00
Benjamin Dauvergne d697773c2d Override User.check_password() in LDAPUser
The check_password() method now directly verify the password agains the
LDAP server.
2014-12-05 14:22:27 +01:00
Benjamin Dauvergne 398e3a932e Override has_usable_password() in LDAPuser to let the LDAP configuration decide if an user can change its password 2014-12-05 14:04:41 +01:00
Benjamin Dauvergne 2a38747fa9 Log search for users when authenticating against LDAP, fix log of error during search, fix building DN from template and fix logs of errors during bind 2014-12-05 13:58:47 +01:00
Benjamin Dauvergne e97bca033e Fix bad use of set_password() and set_unusable_password() in commits 8546afda7 and f3e8a5db 2014-12-05 13:35:30 +01:00
Benjamin Dauvergne 8546afda7c In LDAP backend save user object after setting or reseting the password 2014-12-05 13:25:19 +01:00
Benjamin Dauvergne f3e8a5dbf7 Do not set default to keep LDAP password in Django user, only synchronize password on first login and on request by the user 2014-12-05 12:30:01 +01:00