Top Description Methods
org.apache.hc.client5.http.auth

public Interface AuthCache

Known Direct Implementers
org.apache.hc.client5.http.impl.auth.BasicAuthCache
Imports
org.apache.hc.core5.http.HttpHost

This interface represents an cache of AuthScheme state information that can be re-used for preemptive authentication by subsequent requests.
Since
4.1

Method Summary

Modifier and TypeMethod and Description
public void
public AuthScheme

Returns:

the authentication state ir null if not available in the cache.
get
(HttpHost
the authentication authority.
host
)

Returns the authentication state with the given authentication scope from the cache if available.

public default AuthScheme

Returns:

the authentication state ir null if not available in the cache.
get
(HttpHost
the authentication authority.
host
,
String
the path prefix (the path component up to the last segment separator). Can be null.
pathPrefix
)

Returns the authentication state with the given authentication scope from the cache if available.

public void
put(HttpHost
the authentication authority.
host
,
AuthScheme
the cacheable authentication state.
authScheme
)

Stores the authentication state with the given authentication scope in the cache.

public default void
put(HttpHost
the authentication authority.
host
,
String
the path prefix (the path component up to the last segment separator). Can be null.
pathPrefix
,
AuthScheme
the cacheable authentication state.
authScheme
)

Stores the authentication state with the given authentication scope in the cache.

public void
remove(HttpHost
the authentication authority.
host
)

Removes the authentication state with the given authentication scope from the cache if found.

public default void
remove(HttpHost
the authentication authority.
host
,
String
the path prefix (the path component up to the last segment separator). Can be null.
pathPrefix
)

Removes the authentication state with the given authentication scope from the cache if found.

Method Detail

clearback to summary
public void clear()
getback to summary
public AuthScheme get(HttpHost host)

Returns the authentication state with the given authentication scope from the cache if available.

Parameters
host:HttpHost

the authentication authority.

Returns:AuthScheme

the authentication state ir null if not available in the cache.

getback to summary
public default AuthScheme get(HttpHost host, String pathPrefix)

Returns the authentication state with the given authentication scope from the cache if available.

Parameters
host:HttpHost

the authentication authority.

pathPrefix:String

the path prefix (the path component up to the last segment separator). Can be null.

Returns:AuthScheme

the authentication state ir null if not available in the cache.

Since
5.2
putback to summary
public void put(HttpHost host, AuthScheme authScheme)

Stores the authentication state with the given authentication scope in the cache.

Parameters
host:HttpHost

the authentication authority.

authScheme:AuthScheme

the cacheable authentication state.

putback to summary
public default void put(HttpHost host, String pathPrefix, AuthScheme authScheme)

Stores the authentication state with the given authentication scope in the cache.

Parameters
host:HttpHost

the authentication authority.

pathPrefix:String

the path prefix (the path component up to the last segment separator). Can be null.

authScheme:AuthScheme

the cacheable authentication state.

Since
5.2
removeback to summary
public void remove(HttpHost host)

Removes the authentication state with the given authentication scope from the cache if found.

Parameters
host:HttpHost

the authentication authority.

removeback to summary
public default void remove(HttpHost host, String pathPrefix)

Removes the authentication state with the given authentication scope from the cache if found.

Parameters
host:HttpHost

the authentication authority.

pathPrefix:String

the path prefix (the path component up to the last segment separator). Can be null.

Since
5.2