Skip to content
23 changes: 15 additions & 8 deletions api-management/authentication/jwt-signature-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,31 @@ Tyk Classic APIs continue to use the existing JWKS caching behavior with the 240

### JWKS Cache Management

New [Gateway API](/tyk-gateway-api) endpoints are available from **Tyk 5.10.0** to manage JWKS caches programmatically. These endpoints work for both Tyk OAS and Tyk Classic APIs:
Tyk Gateway and Dashboard APIs expose endpoints to manage JWKS caches programmatically for both Tyk OAS and Tyk Classic APIs:

| Endpoint | Method | Description |
| ------------------------- | -------- | ---------------------------------------- |
| `/tyk/cache/jwks` | `DELETE` | Invalidate JWKS caches for all APIs |
| `/tyk/cache/jwks/{apiID}` | `DELETE` | Invalidate JWKS cache for a specific API |
| Endpoint | Method | Description | Availability |
| ------------------------- | -------- | ---------------------------------------- | ------------ |
| `/tyk/cache/jwks` | `DELETE` | Invalidate JWKS caches for all APIs | Tyk 5.10.0+ |
| `/tyk/cache/jwks/{apiID}` | `DELETE` | Invalidate JWKS cache for a specific API | Tyk 5.10.0+ |
| `/api/cache/jwks/{apiID}` | `DELETE` | Invalidate JWKS cache for a specific API on all connected Gateways | Tyk 5.11.0+ |

**Note:** These endpoints are currently available only through the Tyk [Gateway API](/tyk-gateway-api) and are not yet extended to the Tyk [Dashboard API](/tyk-dashboard-api).
<Note>
The Dashboard API endpoint is restricted to users with `admin` privileges and can only be used to flush the cache for APIs in the user's [Organisation](/tyk-dashboard-api#organisations%2C-apis-and-users).
</Note>

**Example usage:**
```bash
# Flush all JWKS caches
curl -X DELETE http://your-gateway:8080/tyk/cache/jwks \
-H "x-tyk-authorization: your-secret"
-H "x-tyk-authorization: your-gateway-secret"

# Flush JWKS cache for specific API
curl -X DELETE http://your-gateway:8080/tyk/cache/jwks/your-api-id \
-H "x-tyk-authorization: your-secret"
-H "x-tyk-authorization: your-gateway-secret"

# Flush JWKS cache for specific API on all connected Gateways
curl -X DELETE http://your-dashboard:8080/api/cache/jwks/your-api-id \
-H "authorization: your-dashboard-secret"
```

## FAQ
Expand Down