Class SidebandApiFilter
java.lang.Object
org.forgerock.openig.ping.sideband.SidebandApiFilter
- All Implemented Interfaces:
Filter
Sends the requests and responses to the Ping Sideband API, then processes its decisions and accept/reject/rewrite
requests and responses.
Ping Sideband API is provided by these 3 Ping services :
- PingAuthorize
- PingAccess
- PingOne Authorize API Access Management (AAM)
The SideBand API is an API in front of the Ping's decision engine, which offers:
- A simpler API than the "versatility and expressiveness" of the Ping's Decision engine API.
- Access Token validation and extraction
- A request/response rewrite feature
Notes on Request/Response closure
- The requests/responses to the sideband API are closed by this filter.
- The incoming request will NOT be closed by this filter, but by its instantiator.
- The outgoing request will be closed by this filter.
- The incoming response will be closed by this filter ONLY IF its entity is not reused. Otherwise, its entity will be closed by the outgoing response consumer.
- The outgoing response will be closed by its consumer.
-
Constructor Summary
ConstructorDescriptionSidebandApiFilter
(URI gatewayServiceUri, Handler sidebandApiHandler, List<String> sendBodyOnTheseContentTypes) Create a new Sideband API Filter. -
Method Summary
-
Constructor Details
-
SidebandApiFilter
public SidebandApiFilter(URI gatewayServiceUri, Handler sidebandApiHandler, List<String> sendBodyOnTheseContentTypes) Create a new Sideband API Filter.- Parameters:
gatewayServiceUri
- the gateway service URIsidebandApiHandler
- the handler to use to contact the Sideband APIsendBodyOnTheseContentTypes
- the allowed content types to send to Ping Sideband API
-
-
Method Details
-
filter
public Promise<Response,NeverThrowsException> filter(Context context, Request incomingRequest, Handler next) Description copied from interface:Filter
Filters 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.
-