Package io.imagekit.core.http
Interface ProxyAuthenticator
-
- All Implemented Interfaces:
public interface ProxyAuthenticatorProvides credentials when an HTTP proxy responds with
407 Proxy Authentication Required.Implementations inspect the 407 response (typically its
Proxy-Authenticateheader) and return the request to retry with aProxy-Authorizationheader set, or Optional.empty to abandon authentication and surface the 407 to the caller.Implementations must be thread-safe; they may be invoked concurrently from multiple HTTP calls.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classProxyAuthenticator.Companion
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpRequest>authenticate(Proxy proxy, HttpRequest request, HttpResponse response)-
-
Method Detail
-
authenticate
abstract Optional<HttpRequest> authenticate(Proxy proxy, HttpRequest request, HttpResponse response)
- Parameters:
proxy- the proxy that produced the challenge, or Proxy.NO_PROXY if the route is not yet establishedrequest- the request that produced responseresponse- the 407 challenge response- Returns:
the retry request to send (typically request with a
Proxy-Authorizationheader added), or Optional.empty to abandon authentication
-
-
-
-