Class OidcProviderGenerator

java.lang.Object
org.mockserver.oidc.OidcProviderGenerator

public class OidcProviderGenerator extends Object
Generates MockServer Expectations that serve a complete set of OIDC/OAuth2 identity provider endpoints: discovery, JWKS, token, userinfo, introspection, and revocation. All tokens are signed with a freshly generated RSA key pair whose public key is exposed via the JWKS endpoint, so OIDC-aware clients can validate tokens end-to-end without any external infrastructure.

Usage mirrors the WSDL and OpenAPI importers: call generate(OidcProviderConfiguration) with a configuration (or defaults) and upsert the returned expectations into the mock server.

  • Constructor Details

    • OidcProviderGenerator

      public OidcProviderGenerator()
  • Method Details

    • generate

      public List<Expectation> generate(OidcProviderConfiguration config)
      Generates OIDC provider expectations from the given configuration.
      Parameters:
      config - the provider configuration (must not be null)
      Returns:
      the generated expectations (one per endpoint, never empty)