Package com.checkout

Class CustomAwsRedirectStrategy

  • All Implemented Interfaces:
    org.apache.http.client.RedirectStrategy

    public class CustomAwsRedirectStrategy
    extends org.apache.http.impl.client.DefaultRedirectStrategy
    LaxRedirectStrategy sends the original headers during the first request, then sends only the minimum set of headers necessary for subsequent requests during the redirect. This behavior is intended to prevent the loss of authentication or other critical headers during a redirect. The purpose of this implementation is to exclude the original CKO Headers from the request that is sent.
    • Field Summary

      • Fields inherited from class org.apache.http.impl.client.DefaultRedirectStrategy

        INSTANCE, REDIRECT_LOCATIONS, SC_PERMANENT_REDIRECT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.http.client.methods.HttpUriRequest getRedirect​(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)  
      • Methods inherited from class org.apache.http.impl.client.DefaultRedirectStrategy

        createLocationURI, getLocationURI, isRedirectable, isRedirected
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomAwsRedirectStrategy

        public CustomAwsRedirectStrategy()
    • Method Detail

      • getRedirect

        public org.apache.http.client.methods.HttpUriRequest getRedirect​(org.apache.http.HttpRequest request,
                                                                         org.apache.http.HttpResponse response,
                                                                         org.apache.http.protocol.HttpContext context)
                                                                  throws org.apache.http.ProtocolException
        Specified by:
        getRedirect in interface org.apache.http.client.RedirectStrategy
        Overrides:
        getRedirect in class org.apache.http.impl.client.DefaultRedirectStrategy
        Throws:
        org.apache.http.ProtocolException