File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,8 @@ def get_jwks():
1616 for key in settings .JWKS_URL .keys ():
1717 if key not in settings .JWKS_CACHE :
1818 missing = True
19-
2019 if not missing :
2120 return settings .JWKS_CACHE
22-
2321 # Make a request to get the JWKS
2422 for key in settings .JWKS_URL :
2523 try :
@@ -53,7 +51,6 @@ def verify_jwt(token: str = Depends(get_token_from_header)):
5351 try :
5452 decoded_token = jwt .JWT (key = key , jwt = token )
5553 return decoded_token .claims
56- except :
54+ except Exception :
5755 pass
58-
59- raise HTTPException (status_code = 401 , detail = "Failed to verify JWT token against public keys array." )
56+ raise HTTPException (status_code = 401 , detail = "Failed to verify JWT token" )
Original file line number Diff line number Diff line change @@ -13,10 +13,9 @@ class Config(BaseSettings):
1313
1414 JWKS_CACHE : list [JWKSet ] | None = None
1515 JWKS_URL : dict [str , str ] = {
16- "b2b" :"https://platform.pennlabs.org/identity/jwks/" ,
17- "user" :"https://platform.pennlabs.org/accounts/.well-known/jwks.json"
16+ "b2b" : "https://platform.pennlabs.org/identity/jwks/" ,
17+ "user" : "https://platform.pennlabs.org/accounts/.well-known/jwks.json"
1818 }
19-
2019 SITE_DOMAIN : str = "analytics.pennlabs.org"
2120
2221 ENVIRONMENT : Environment = Environment .PRODUCTION
You can’t perform that action at this time.
0 commit comments