Package org.mockserver.oidc
Class OidcIntrospectionCallback
java.lang.Object
org.mockserver.oidc.OidcIntrospectionCallback
- All Implemented Interfaces:
ExpectationCallback<HttpResponse>,ExpectationResponseCallback
Mock OIDC/OAuth2 introspection endpoint (RFC 7662).
When the provider issues opaque access tokens
(OidcProviderConfiguration.isOpaqueAccessToken()), the only way to validate them is
introspection. This callback resolves the presented token form parameter against the
opaque tokens recorded by OidcTokenMinter:
- known, unexpired opaque token →
{"active":true, ...claims}; - unknown or expired opaque token →
{"active":false}; - no opaque token presented (or no opaque tokens issued) → the provider's static introspection
result, with
activedriven byissueExpiredToken(preserving Wave-1 behaviour).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(HttpRequest request) Called for every request when expectation condition has been satisfied.
-
Constructor Details
-
OidcIntrospectionCallback
public OidcIntrospectionCallback()
-
-
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
-