Commit Graph

22 Commits

Author SHA1 Message Date
Benjamin Dauvergne d4fd7173eb show change password link after user unlink (fixes #32953) 2019-05-16 18:13:18 +02:00
Benjamin Dauvergne 0077218685 improve code style (#32866)
- remove obviously dead code (reported by flake8)
- fix PEP8 violations
- rename variable using stdlib builtin names
- use get_version() from combo's setup.py
2019-05-09 14:02:40 +02:00
Benjamin Dauvergne e04459825c add copyright headers (#32866) 2019-05-09 14:02:40 +02:00
Benjamin Dauvergne 7f191e9bc6 tests: use pg_virtualenv with on jenkins (#27083) 2019-05-03 16:34:49 +02:00
Benjamin Dauvergne ce56e15d0b apps: hide password management link when FC authenticated (#27083)
It's done by implementing a2_hook_user_can_change_password on the
AppConfig object.
2019-05-03 16:34:49 +02:00
Frédéric Péters 5a20b28487 tests: adjust not to find link by label (#29228) 2019-01-02 17:26:04 +01:00
Benjamin Dauvergne 79995b127f views: search email case insensitively (fixes #29007) 2018-12-14 13:43:04 +01:00
Benjamin Dauvergne 806b4cdbab lock first name and last name (fixes #27044) 2018-11-29 21:14:05 +01:00
Benjamin Dauvergne 460def09da launch tests with Django 1.11 (fixes #27095) 2018-10-08 16:54:29 +02:00
Benjamin Dauvergne 2e5ac496b8 keep authentication context (fixes #21908)
- simplify and reorganize login templates,
- URL are not built inside templates anymore,
- we have now 3 different templates:
  - login.html for the login page
  - registration.html for the registration page
  - linking.html for the account page
- using feature from #25623, authentication_method is kept by the
  registration view.
- the service slug is correctly threaded between every views.
- explanations about FranceConnect are now done in a common template
  "explanation.html".
- restore popup mode, use it through setting A2_FC_POPUP=True, it works
  for:
  - login and login with registration (workflow for login with
    registration is a bit complicated),
  - registration,
  - and linking (linking your existing to FC through the "My account"
   page)
  unlinking is not handled with a popup.
2018-09-18 17:54:36 +02:00
Benjamin Dauvergne 681dcf3862 implement AppConfig.a2_hook_user_can_reset_password (fixes #25535)
It returns True if an user is linked to an FC account, it allows any
FC user to login to its account as long as it still has control of the
FC email even if he has lost its FC credentials.
2018-07-30 17:22:36 +02:00
Benjamin Dauvergne 5f77fbe75e do not set a password on FranceConnect users (#25535)
As user don't know this password they can never change it...
2018-07-30 17:22:36 +02:00
Benjamin Dauvergne 0caece2bb6 tests: add tests on new password related functions (#24835)
- verify new users have a password set
- verify old users keep their password on linking and are not
  asked for a new password if they used their password for logging in.
2018-07-14 08:31:34 +02:00
Josue Kouka 215c1f5abd use REQUESTS_PROXIES instead of A2_FC_REQUESTS_PROXIES (#24929) 2018-07-02 14:48:16 +02:00
Josue Kouka deebd83a60 add fc requests proxies support (#24713) 2018-06-29 15:05:20 +02:00
Benjamin Dauvergne afa48159bb api: add franceconnect information to user's API when ?full is used (fixes #21962)
The following field is added to user's attributes if FC plugin is
enabled and the "full" parameter is given to the user's API:

   "franceconnect": {
      "linked": true,
      "link_url": "https://idp/accounts/fc/callback/",
      "unlink_url": "https://idp/accounts/fc/unlink/"
   }
2018-02-20 11:10:06 +01:00
Benjamin Dauvergne 0f877b75a9 views: show warning to users with a mail linked to another FC account (fixes #21292)
The warning will help them connect their FC account to normally
registered account.
2018-02-15 13:03:40 +01:00
Benjamin Dauvergne 313824142a always unlink from all FC accounts (fixes #19947) 2017-11-08 11:11:12 +01:00
Benjamin Dauvergne 6249926666 views: automatically link user with existing email if email is unique (fixes #18763)
Email must be unique if settings.A2_EMAIL_IS_UNIQUE is True or
get_default_ou().email_is_unique is True.
2017-09-19 16:45:30 +02:00
Benjamin Dauvergne d36f1110d3 tests: test with non ASCII characters 2017-09-18 17:18:12 +02:00
Josue Kouka ffdf6047dc allow fc unlinking through api (#15297) 2017-07-05 15:33:05 +02:00
Benjamin Dauvergne 9ee35f8e19 validate id_token
Signature is validated, exp, aud and iis fields are checked.

Also add tests using tox and py.test. Proper validation of signature is verified
using jwcrypto.
2017-06-15 18:46:27 +02:00