Changed matchingKey, found := keySet.LookupKeyID(kid) to be determinate if not found (#4745)

This commit is contained in:
Jordan Tunstill
2026-02-18 15:39:57 -08:00
committed by GitHub
parent 1306f38c20
commit cbdff3fa9c
+2 -1
View File
@@ -261,7 +261,8 @@ func verifyJWT(ctx context.Context, client *http.Client, tokenParts []string, pa
}
matchingKey, found := keySet.LookupKeyID(kid)
if !found {
return false, fmt.Errorf("no matching JWKS key")
// this is a determinate failure indicating rotation
return false, nil
}
// Parse matching key to the "raw" key type needed for signature verification