Skip to content

Commit a9f4ec2

Browse files
authored
Query jwks by the kid
1 parent c8ab8a8 commit a9f4ec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

authress/api/token_verifier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def verify_token(self, authressCustomDomain, token, options=None):
5252
if (clientIdMatcher is not None and clientIdMatcher.group(1) != unverifiedPayload['sub']):
5353
raise Exception("Unauthorized", "Service ID does not match token sub claim")
5454

55-
jwk = self.get_public_key(f"{issuer}/.well-known/openid-configuration/jwks", kid)
55+
jwk = self.get_public_key(f"{issuer}/.well-known/openid-configuration/jwks?kid={kid}", kid)
5656

5757
try:
5858
return jwt.decode(authenticationToken, jwt.api_jwk.PyJWK.from_dict(jwk).key, algorithms=['EdDSA'], options = { 'verify_aud': False })

0 commit comments

Comments
 (0)