Class RequestCopyFilter

  • All Implemented Interfaces:
    org.forgerock.http.Filter

    public final class RequestCopyFilter
    extends Object
    implements org.forgerock.http.Filter
    This filter is in charge to create a defensive copy of the Request on which the chain of execution will be based on. At the end of the chain of execution, the copy request will be closed.

    This can be helpful when it is needed to reuse the original request(as in the HttpBasicAuthFilter or in the PasswordReplayFilterHeaplet).

    • Method Detail

      • requestCopyFilter

        public static RequestCopyFilter requestCopyFilter()
        Returns the unique instance of a RequestCopyFilter.
        Returns:
        The unique instance of a RequestCopyFilter.
      • filter

        public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,​org.forgerock.util.promise.NeverThrowsException> filter​(org.forgerock.services.context.Context context,
                                                                                                                                                     org.forgerock.http.protocol.Request request,
                                                                                                                                                     org.forgerock.http.Handler next)
        Specified by:
        filter in interface org.forgerock.http.Filter