Package org.mockserver.oidc
Class OidcAuthorizationCodeCallback
java.lang.Object
org.mockserver.oidc.OidcAuthorizationCodeCallback
- All Implemented Interfaces:
ExpectationCallback<HttpResponse>,ExpectationResponseCallback
Mock OIDC
/authorize endpoint implementing the OAuth2 authorization-code grant.
This is a mock — there is no login UI or consent screen. It accepts the standard authorization
request query parameters, deterministically issues an opaque authorization code, records
the code (with the redirect_uri and any PKCE challenge) in OidcAuthorizationStore,
and 302-redirects the user agent back to redirect_uri?code=<code>&state=<state>.
The matching redirect_uri and PKCE code_verifier are validated later when the
code is exchanged at /token by OidcTokenCallback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(HttpRequest request) Called for every request when expectation condition has been satisfied.
-
Constructor Details
-
OidcAuthorizationCodeCallback
public OidcAuthorizationCodeCallback()
-
-
Method Details
-
handle
Description copied from interface:ExpectationResponseCallbackCalled for every request when expectation condition has been satisfied. The request that satisfied the expectation condition is passed as the parameter and the return value is the request that will be returned.- Specified by:
handlein interfaceExpectationCallback<HttpResponse>- Specified by:
handlein interfaceExpectationResponseCallback- Parameters:
request- the request that satisfied the expectation condition- Returns:
- the response that will be returned
-