0001-misc-adapt-to-change-in-protocol-for-redirect_logout.patch
src/authentic2_auth_fedict/__init__.py | ||
---|---|---|
35 | 35 |
user = kwargs.get('user') |
36 | 36 |
user.backend = 'authentic2_auth_fedict.backends.FedictBackend' |
37 | 37 | |
38 |
def a2_hook_redirect_logout_list(self, request, **kwargs): |
|
39 |
from mellon.views import logout |
|
40 | ||
41 |
if 'mellon_session' in request.session: |
|
42 |
response = logout(request) |
|
43 |
if 'Location' in response: |
|
44 |
return [response['Location']] |
|
45 |
return [] |
|
46 | ||
38 | 47 | |
39 | 48 |
default_app_config = 'authentic2_auth_fedict.AppConfig' |
40 | 49 | |
... | ... | |
52 | 61 |
return ['authentic2_auth_fedict.backends.FedictBackend'] |
53 | 62 | |
54 | 63 |
def redirect_logout_list(self, request, next_url=None): |
64 |
# duplicated, should be removed in the future when |
|
65 |
# AppConfig.a2_hook_redirect_logout_list is the only one required |
|
55 | 66 |
from mellon.views import logout |
56 | 67 | |
57 | 68 |
if 'mellon_session' in request.session: |
58 |
- |