Skip to content

Commit

Permalink
visa passport verification
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Mar 28, 2024
1 parent cf53abb commit a3c9cfc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions permissions/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ async def get_user_info(access_token):
for visa_dataset in visa_datasets:
try:
visa = jwt.decode(visa_dataset, options={"verify_signature": False}, algorithms=["RS256"])
if visa['iss']==idp_issuer:
pass
else:
raise web.HTTPUnauthorized('invalid visa token')
dataset_url = visa["ga4gh_visa_v1"]["value"]
dataset_url_splitted = dataset_url.split('/')
visa_dataset = dataset_url_splitted[-1]
Expand Down

0 comments on commit a3c9cfc

Please sign in to comment.