fix(chalice): fixed SSO
This commit is contained in:
parent
29fa43d5a9
commit
2760e57d9a
1 changed files with 11 additions and 2 deletions
|
|
@ -35,8 +35,17 @@ async def process_sso_assertion(request: Request):
|
|||
session = req["cookie"]["session"]
|
||||
auth = init_saml_auth(req)
|
||||
|
||||
redirect_to_link2 = json.loads(req.get("post_data", {}) \
|
||||
.get('RelayState', '{}')).get("iFrame")
|
||||
post_data = req.get("post_data")
|
||||
if post_data is None:
|
||||
post_data = {}
|
||||
elif isinstance(post_data, str):
|
||||
post_data = json.loads(post_data)
|
||||
elif not isinstance(post_data, dict):
|
||||
logger.error("Received invalid post_data")
|
||||
logger.error("type: {}".format(type(post_data)))
|
||||
logger.error(post_data)
|
||||
|
||||
redirect_to_link2 = post_data.get('RelayState', {}).get("iFrame")
|
||||
request_id = None
|
||||
if 'AuthNRequestID' in session:
|
||||
request_id = session['AuthNRequestID']
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue