0001-torebase-ecazenave-remark-on-logout-69720.patch
src/authentic2/views.py | ||
---|---|---|
628 | 628 |
# Get redirection targets for full logout with redirections |
629 | 629 |
# (needed before local logout) |
630 | 630 |
targets = redirect_logout_list(request) |
631 |
# Last redirection will be the current next_url |
|
631 | 632 |
targets.append(next_url) |
632 | 633 |
# Local logout |
633 | 634 |
request.journal.record('user.logout') |
634 | 635 |
auth_logout(request) |
635 |
# Last redirection will be the current next_url |
|
636 |
# Put redirection targets in session (after local logout) |
|
637 |
request.session['logout_redirections'] = targets |
|
638 |
targets = request.session.pop('logout_redirections', None) |
|
639 | 636 |
if targets: |
640 | 637 |
# Full logout with redirections |
641 | 638 |
next_url = targets.pop(0) |
642 |
request.session['logout_redirections'] = targets |
|
639 |
if targets: |
|
640 |
# Put redirection targets in session |
|
641 |
request.session['logout_redirections'] = targets |
|
643 | 642 |
response = shortcuts.redirect(next_url) |
644 | 643 |
response.set_cookie('a2_just_logged_out', 1, max_age=60, samesite='Lax') |
645 | 644 |
return response |
646 |
- |