feat(api): disable on the fly edit

feat(api): fixed redirect response
feat(api): fixed jwt expiration date
This commit is contained in:
Taha Yassine Kraiem 2021-12-03 15:27:13 +01:00
parent 0b94b629c0
commit c6157cee4f
3 changed files with 3 additions and 5 deletions

View file

@ -85,7 +85,7 @@ def process_sso_assertion():
if jwt is None:
return {"errors": ["null JWT"]}
return Response(
status_code=307,
status_code=302,
body='',
headers={'Location': SAML2_helper.get_landing_URL(jwt), 'Content-Type': 'text/plain'})

View file

@ -693,7 +693,8 @@ def authenticate_sso(email, internal_id, exp=None):
return authorizers.generate_jwt(r['id'], r['tenantId'],
TimeUTC.datetime_to_timestamp(cur.fetchone()["jwt_iat"]),
aud=f"front:{helper.get_stage_name()}",
exp=exp)
exp=exp + TimeUTC.datetime_to_timestamp(cur.fetchone()["jwt_iat"]) \
if exp is not None else None)
return None

View file

@ -1,3 +0,0 @@
#!/bin/bash
python env_handler.py
chalice local --host 0.0.0.0 --stage ${ENTERPRISE_BUILD}