Class OidcTokenCallback

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

public class OidcTokenCallback extends Object implements ExpectationResponseCallback
Mock OIDC /token endpoint.

For client_credentials, refresh_token, or any request without an authorization_code grant, the provider's OidcTokenMinter mints a fresh token response at request time, honouring the requested scope (and including a refresh_token for the refresh_token grant).

For grant_type=authorization_code it completes the authorization-code flow: it consumes the single-use code issued by OidcAuthorizationCodeCallback, validates the redirect_uri matches the one bound at /authorize, validates the PKCE code_verifier against the stored code_challenge (when one was supplied), then mints the token response at request time — embedding the nonce echoed from the authorize request into the id_token.

  • Constructor Details

    • OidcTokenCallback

      public OidcTokenCallback()
  • Method Details