Class FapiInteractionIdFilter
java.lang.Object
org.forgerock.openig.fapi.interactionid.FapiInteractionIdFilter
- All Implemented Interfaces:
Filter
Filter responsible for managing the FAPI_INTERACTION_ID header value and initializing the
InteractionIdFapiContext with it.
- Creating a new UUID header value if the request header is missing
- Propagating the request header downstream (if it is missing)
- Sets the
TransactionIdContextto the x-fapi-interaction-id header value.
This means that the X-ForgeRock-TransactionID header sent to the ForgeRock platform will be set to the same value as the x-fapi-interaction-id header, which allows requests to be traced in these systems by searching logs for the x-fapi-interaction-id header value. - Creating a dedicated
InteractionIdFapiContext - Adds the x-fapi-interaction-id to the
MDC, this includes the value in all log messages produced when processing the request - Adding the header value back in the response
This filter is not expected to be instantiated directly as it is managed as part of the core FAPI Filter
chains e.g. FapiDcrFilterChainHeaplet.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FapiInteractionIdFilter
public FapiInteractionIdFilter()
-
-
Method Details
-
filter
public Promise<Response,NeverThrowsException> filter(Context context, Request request, Handler next) Description copied from interface:FilterFilters the request and/or response of an exchange. To pass the request to the next filter or handler in the chain, the filter callsnext.handle(context, request).This method may elect not to pass the request to the next filter or handler, and instead handle the request itself. It can achieve this by merely avoiding a call to
next.handle(context, request)and creating its own response object. The filter is also at liberty to replace a response with another of its own by intercepting the response returned by the next handler.
-