------------------------------------------------------------------ == A token for a DIFFERENT audience, signed by the SAME issuer ------------------------------------------------------------------ demo-service's tokens carry aud=[orders-api] thanks to the token customiser. Here we ask for one and then present it to a resource server configured to require a different audience - and to one that does not check at all. aud claim in the token: "aud": "orders-api", "exp": 1787539386, "iat": 1787538786, "iss": "http://localhost:9000", ------------------------------------------------------------------ == Resource server running with demo.validate-audience=false ------------------------------------------------------------------ This is the Spring Boot default: issuer-uri alone validates signature, exp/nbf and iss. Audience is not checked unless you add a validator. GET /api/orders -> 200 {"orders":[{"total":"42.00","id":1}],"subject":"demo-service","clientId":null,"scopes":["orders.read"],"roles":null,"tenant":"acme","audience":["orders-api"]} ------------------------------------------------------------------ == The same token with a deliberately mangled signature ------------------------------------------------------------------ HTTP/1.1 200 ------------------------------------------------------------------ == No token at all ------------------------------------------------------------------ HTTP/1.1 401 WWW-Authenticate: Bearer resource_metadata="http://localhost:8090/.well-known/oauth-protected-resource"