Skip to content

Commit

Permalink
Fix possible key error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracy.Wu committed Jul 8, 2021
1 parent 1f48326 commit c916415
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fastapi_opa/auth/auth_saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ async def authenticate(

elif 'slo' in request.query_params:
logger.debug(datetime.utcnow(), '--slo--')
del request.session['saml_session']
if request.session.get('saml_session'):
del request.session['saml_session']
return await self.single_log_out(auth)

elif 'sls' in request.query_params:
Expand Down

0 comments on commit c916415

Please sign in to comment.