Class OidcDiscoveryCallback

java.lang.Object
org.mockserver.oidc.OidcDiscoveryCallback
All Implemented Interfaces:
ExpectationCallback<HttpResponse>, ExpectationResponseCallback

public class OidcDiscoveryCallback extends Object implements ExpectationResponseCallback
Serves the OIDC discovery document (/.well-known/openid-configuration).

A class callback rather than a static response so the issuer — and every endpoint URL derived from it — is resolved per request by OidcIssuerResolver. OIDC Discovery §4.3 requires the advertised issuer to match the URL the relying party fetched the document from; baking a fixed http://localhost:1080 at generate time broke every client running the mock on a random port (Testcontainers), which is the most common deployment.

  • Constructor Details

    • OidcDiscoveryCallback

      public OidcDiscoveryCallback()
  • Method Details