Skip to content

Commit

Permalink
fix: Don't raise exception on invalid access token
Browse files Browse the repository at this point in the history
  • Loading branch information
AgathaSorceress committed Jan 5, 2024
1 parent daa9a53 commit 9fac944
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse_token_authenticator/token_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ async def check_oidc_auth(
response = requests.post(
oidc_metadata.introspection_endpoint, data=data, auth=auth
)
response.raise_for_status()
if response.status_code == 401:
logger.info("User's access token is invalid")
return None

introspection_resp = response.json()

if not introspection_resp["active"]:
Expand Down

0 comments on commit 9fac944

Please sign in to comment.