Commit Graph

4734 Commits

Author SHA1 Message Date
Benjamin Dauvergne 90eefd42eb app_settings: set password to random value by default (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1995891e5f views: ask for new passord on unlink only if logged using FC (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 2522e75b5b utils: fix typo in warning log (#24835) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c7521da95a utils: add special case for mapping the User.password (fixes #24835)
The goal is to set a random password for new accounts,
so that they can recover it. In this case we use
the value {"compute": "random"}.
2019-05-31 14:51:55 +02:00
Josue Kouka 58a10db62c use REQUESTS_PROXIES instead of A2_FC_REQUESTS_PROXIES (#24929) 2019-05-31 14:51:55 +02:00
Josue Kouka 6b424ded2f add fc requests proxies support (#24713) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne e688ba4076 views: prevent None success URL in unlink view (fixes #24708)
Logout URL to FC can be None if the current session was not opened
through an FC authentication.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne db85ba1e37 utils: fix access to verified property of mappings (fixes #23271) 2019-05-31 14:51:55 +02:00
Elias Showk 5ea5056f09 remove url patterns to support django 1.11 (#23270) 2019-05-31 14:51:55 +02:00
Frédéric Péters 21b4f96e8d do not allow unauthenticated access to unlink page (fixes #22405) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1008ebb4e8 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/"
   }
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 10337ad952 locale: update french translations for release 0.10 (fixes #21874)
email was replaced by « adresse de courriel » everywhere.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c0f2d4d940 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne a8cc9cc6ac retry HTTP requests 3 times (fixes #21783)
Retry is applied to access token request and user info requests (through
OAuth2Session). There is a small exponential backoff of 0.5 and 1s.

Also decrease log level of message for failure of retrieval of the
access token or the user info to the level WARNING, that's never been a
problem for the user, as he was correctly redirected to its origin
(usually and IdP endpoint).
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne e4a6e58b06 add support for service slugs on login 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 7fb822048e fix login with a non-unique email where an account linked to another FC account already exists 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne b5b1749dd8 augment timeout on POST to FC to 10 seconds (fixes #21596) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 7a76b9e951 add request to fc-link hook (fixes #20288) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 6bce73ec97 call a2 hooks for linking and unlinking events (fixes #20228) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 5da8849b6f update french translations (#20078) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 3594460be5 views: change messages levels (#20078) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 8c3387c459 views: do not permit linking if the user has already a link to FC (#20078) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 387252a3d0 views: forbid automatic linking based on email if multiples users are found or if target user has already a link (fixes #20078) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne ccffde71b0 backends: make sub parameter non optional in authenticate() 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne ccb4db5a21 always unlink from all FC accounts (fixes #19947) 2019-05-31 14:51:55 +02:00
Serghei Mihai 2de20af107 update FC logos (#19585) 2019-05-31 14:51:55 +02:00
Serghei Mihai 8cae4f5132 update login and register buttons images (#19162) 2019-05-31 14:51:55 +02:00
Serghei 42bc28067c replace logo image for account linking (#17391) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 4894bb1f57 views: force fc-register to always redirect post registration to fc-login-or-link (fixes #19270)
Without it linking to FC does not happen
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 8a5d976659 utils: allow a mapping to depend from another using tags (fixes #19251) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne ee2a823866 utils: add an if-empty modifier to only set a value from FC if the existing value is empty (fixes #19250) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 6d01145b88 utils: normalize mapping in apply_user_info_mappings (#19250) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne a55a6f5b45 views: block DisplayMessageBeforeRedirectMiddleware on redirect to FC (fixes #19247) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 7a289dcf3f utils: add a notempty transformation for attribute mappings (fixes #19233) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 2b333eb18c django 1.9 compatibility 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 1c5b76452f backends: always create new accounts in the default OU (fixes #18764) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 20de25fe0e 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.
2019-05-31 14:51:55 +02:00
Benjamin Dauvergne fbb562a894 models: check issuer using only URL scheme and netloc (fixes #18766) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 922cea34d3 tests: test with non ASCII characters 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne ea0a2541a9 utils: do not set absent references to None, ignore them instead (fixes #18765) 2019-05-31 14:51:55 +02:00
Frédéric Péters e1b125b3a3 style: switch to extra-body-class for custom body class (#17983) 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 219e0ce884 views: remove dead code 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 3c189a5bda utils: allow referencing a sub object of user_info in attribute mapping 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne c05bb4804f views: add setting for FC scopes 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 22c88a1941 backends: fix logging of unicode strings 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne 7723df78cc utils: fix mapping of user attributes 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne be4a827dce indicate registration URL is coming from france connect module 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne e11e14605c redirect to auth_logout if no post logout redirect URI is found 2019-05-31 14:51:55 +02:00
Benjamin Dauvergne a086047684 fix typo introduced in commit a7677f4bc0 (#17331) 2019-05-31 14:51:55 +02:00
Serghei 860c57f293 templates: use different ids for link and its container (#17421) 2019-05-31 14:51:55 +02:00