@Contract(threading=SAFE_CONDITIONAL) public class BasicAuthCache extends Object implements AuthCache
AuthCache
. This implements
expects AuthScheme
to be Serializable
in order to be cacheable.
Instances of this class are thread safe as of version 4.4.
Constructor and Description |
---|
BasicAuthCache() |
BasicAuthCache(SchemePortResolver schemePortResolver)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
AuthScheme |
get(org.apache.hc.core5.http.HttpHost host)
Returns the authentication state with the given authentication scope from the cache
if available.
|
AuthScheme |
get(org.apache.hc.core5.http.HttpHost host,
String pathPrefix)
Returns the authentication state with the given authentication scope from the cache
if available.
|
void |
put(org.apache.hc.core5.http.HttpHost host,
AuthScheme authScheme)
Stores the authentication state with the given authentication scope in the cache.
|
void |
put(org.apache.hc.core5.http.HttpHost host,
String pathPrefix,
AuthScheme authScheme)
Stores the authentication state with the given authentication scope in the cache.
|
void |
remove(org.apache.hc.core5.http.HttpHost host)
Removes the authentication state with the given authentication scope from the cache
if found.
|
void |
remove(org.apache.hc.core5.http.HttpHost host,
String pathPrefix)
Removes the authentication state with the given authentication scope from the cache
if found.
|
String |
toString() |
public BasicAuthCache(SchemePortResolver schemePortResolver)
public BasicAuthCache()
public void put(org.apache.hc.core5.http.HttpHost host, AuthScheme authScheme)
AuthCache
public AuthScheme get(org.apache.hc.core5.http.HttpHost host)
AuthCache
public void remove(org.apache.hc.core5.http.HttpHost host)
AuthCache
public void put(org.apache.hc.core5.http.HttpHost host, String pathPrefix, AuthScheme authScheme)
AuthCache
public AuthScheme get(org.apache.hc.core5.http.HttpHost host, String pathPrefix)
AuthCache
public void remove(org.apache.hc.core5.http.HttpHost host, String pathPrefix)
AuthCache
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.