Skip to content

Commit

Permalink
Raise 403 when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Jun 10, 2024
1 parent af743e2 commit 2a32721
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions egi_notebooks_hub/egiauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ def _validate_scope(self, proposal):
)

async def jwt_authenticate(self, handler, data=None):
self.log.debug("AUTHENTICATE IS BEING CALLED!")
user_info = await self.token_to_user(data)
self.log.debug(user_info)
try:
user_info = await self.token_to_user(data)
except HTTPClientError:
raise web.HTTPError(403)
# this code below comes is from oauthenticator authenticate
# we cannot directly call that method as we don't obtain the access
# token with the code grant but they pass it to us directly
Expand Down

0 comments on commit 2a32721

Please sign in to comment.