Development #6294
Add helper methods to build URLs, redirect responses and and help in login process
Début:
14 janvier 2015
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
There is a lot of replicated code in authentic2 to manipulate URLs, add or remove parameters, redirect to the login URL or another and keeping the current URL in the next
parameter or for handling the login processing (record an authentication event, set the Django user in the session return to the next URL or settings.LOGIN_REDIRECT_URL
). All this code can be factorized to shorten and simplify code and also to prevent errors.
Current version of this serie of patches is on http://perso.entrouvert.org/~bdauvergne/git/cgit.cgi/authentic2.git/log/?h=wip/redirect-helper starting with the commit "Add new utilities to help building URLs with parameters".
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
- Assigné à mis à Benjamin Dauvergne
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
- Statut changé de Nouveau à Solution déployée
Comitted.
commit 62e351cf1bc41e59dc361f75f18d5382d0b8024f Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Mon Jan 5 15:58:16 2015 +0100 Update idp_openid with new redirect helpers commit 84124024f1173a6d8f7744946195f421bd425b12 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:55:25 2014 +0100 Remove legacy redirect_to_login helper method commit d58ddf28ed011aa8c828928b16704c99bba23ea0 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 12:14:46 2014 +0100 Use new helper methods in decorators commit 822ab9ab999b28ee73c713a546e05d3b6b0c1d45 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 12:03:17 2014 +0100 Use new helper methods in default login/password authentication frontend commit e86916dc5cae23b2e3631d4a3d811d28d882f517 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:55:17 2014 +0100 Use new helper method in auth2_ssl commit 6c72edf3e9f62e027f258b8bb9a85356b9622e1d Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 12:40:00 2014 +0100 Add helper method to require a login commit 67e2c2d63c572ad9f43dc02d6f1c321bfa4e83c5 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 12:02:53 2014 +0100 Add helper method for logging in an user doing all needed bookkeeping commit b9f5b1bc080fcb4935cf94e6e7ea18e56f90d4e8 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:45:15 2014 +0100 Add helper method to record an authentication event commit 072df70c792ef0f75ab6bd85f91dcc5fa004c156 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:55:10 2014 +0100 Add helper method to redirect user to next URL commit c1dd7700c75769a1abad64cbfe3f9550a79d2de8 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:43:46 2014 +0100 Add helper method to request a login, copying nonce and next parameters commit 2676e6f9805b8c50aac458bcd0bdb8763a61a310 Author: Benjamin Dauvergne <bdauvergne@entrouvert.com> Date: Wed Dec 17 11:11:59 2014 +0100 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.
Mis à jour par Benjamin Dauvergne il y a environ 9 ans
- Statut changé de Solution déployée à Fermé