redirect logout to wcs
This commit is contained in:
parent
ac9d9e4bd0
commit
44f4011ecf
|
@ -8,5 +8,5 @@
|
|||
"saml2_idp_metadata": "http://authentic.local/idp/saml2/metadata",
|
||||
"saml2_signature_public_key": "certs/saml.crt",
|
||||
"saml2_signature_private_key": "certs/saml.key",
|
||||
"saml2_sp_logout_url": "/sezhame/logout"
|
||||
"sp_logout_url": "/sezhame/mandayelogout"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"saml2_idp_metadata": "http://authentic.local/idp/saml2/metadata",
|
||||
"saml2_signature_public_key": "certs/saml.crt",
|
||||
"saml2_signature_private_key": "certs/saml.key",
|
||||
"saml2_sp_logout_url": "/vincennes-noredirect/deconnexion.do"
|
||||
"sp_logout_url": "/vincennes-noredirect/mandayelogout"
|
||||
}
|
||||
|
|
|
@ -6,12 +6,16 @@ from urlparse import parse_qs
|
|||
from BeautifulSoup import BeautifulSoup
|
||||
import lxml.html
|
||||
|
||||
from mandaye import config
|
||||
from mandaye.log import logger
|
||||
from mandaye.response import _302, _401
|
||||
from mandaye.template import serve_template
|
||||
|
||||
from mandaye.backends.default import Association
|
||||
|
||||
def local_logout(env, values, request, response):
|
||||
return _302(config.template_vars.get('wcs_url'), response.cookies)
|
||||
|
||||
def get_associate_form(env, values):
|
||||
""" Return association template content
|
||||
"""
|
||||
|
@ -65,6 +69,7 @@ def get_multi_template(env, values, current_account):
|
|||
|
||||
class Biblio:
|
||||
|
||||
|
||||
def resp_html_login_page(self, env, values, request, response):
|
||||
""" msg: response message body
|
||||
env: Mandaye environment
|
||||
|
|
|
@ -73,21 +73,12 @@ mapping = [
|
|||
}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout'],
|
||||
'path': r'/sezhame/mandayelogout$',
|
||||
'method': 'GET',
|
||||
'response': {
|
||||
'auth': 'single_logout',
|
||||
}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout_return'],
|
||||
'method': 'GET',
|
||||
'response': {
|
||||
'auth': 'single_logout_return',
|
||||
'values': {
|
||||
'next_url': '/shezame'
|
||||
}
|
||||
}
|
||||
'target': '/sezhame/logout',
|
||||
'on_response': [{
|
||||
'filter': vincennes.local_logout,
|
||||
}]
|
||||
},
|
||||
{
|
||||
'path': r'/mandaye/associate$',
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
from mandaye.auth.saml2 import END_POINTS_PATH
|
||||
from mandaye_vincennes.filters.vincennes import Duonet
|
||||
from mandaye_vincennes.filters import vincennes
|
||||
|
||||
filters = Duonet()
|
||||
filters = vincennes.Duonet()
|
||||
duonet_key = 'CV4j27Em0dM%3d'
|
||||
|
||||
form_values = {
|
||||
|
@ -76,22 +76,22 @@ mapping = [
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout'],
|
||||
'method': 'GET',
|
||||
'response': {'auth': 'single_logout',}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout_return'],
|
||||
'method': 'GET',
|
||||
'response': {
|
||||
'auth': 'single_logout_return',
|
||||
'values': {
|
||||
'next_url': '/Connect.aspx?key=%s' % duonet_key,
|
||||
'next_url': '/mandayelogout',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'path': r'/mandayelogout$',
|
||||
'method': 'GET',
|
||||
'target': '/Connect.aspx?key=%s' % duonet_key,
|
||||
'on_response': [{'filter': vincennes.local_logout}]
|
||||
},
|
||||
{
|
||||
'path': r'/mandaye/sso$',
|
||||
'method': 'GET',
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
from mandaye.auth.saml2 import END_POINTS_PATH
|
||||
from mandaye_vincennes.filters.vincennes import EspaceFamille
|
||||
from mandaye_vincennes.filters import vincennes
|
||||
|
||||
folder_target = '/vincennes-noredirect'
|
||||
filters = EspaceFamille()
|
||||
filters = vincennes.EspaceFamille()
|
||||
|
||||
form_values = {
|
||||
'post_url': '%s/login.do' % folder_target,
|
||||
|
@ -91,20 +91,14 @@ mapping = [
|
|||
}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout'],
|
||||
'path': r'%s/mandayelogout$' % folder_target,
|
||||
'method': 'GET',
|
||||
'response': {'auth': 'single_logout',}
|
||||
},
|
||||
{
|
||||
'path': r'%s$' % END_POINTS_PATH['single_logout_return'],
|
||||
'method': 'GET',
|
||||
'response': {
|
||||
'auth': 'single_logout_return',
|
||||
'values': {
|
||||
'next_url': '/'
|
||||
}
|
||||
}
|
||||
'target': '%s/deconnexion.do' % folder_target,
|
||||
'on_response': [{
|
||||
'filter': vincennes.local_logout,
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
'path': r'/mandaye/disassociate$',
|
||||
'method': 'GET',
|
||||
|
|
Reference in New Issue