public class LocalCachingAuthenticator<T extends HttpCredentials> extends Object implements Authenticator<T>
guava
dependency to use this class.Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
LocalCachingAuthenticator(Authenticator<T> delegate,
long cacheSize,
long timeout,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearCache() |
Authenticator<T> |
getDelegate() |
boolean |
isCached(T credentials) |
void |
removeFromCache(T credentials) |
void |
setDelegate(Authenticator<T> delegate) |
void |
validate(T credentials)
Validate the credentials.
|
public LocalCachingAuthenticator(Authenticator<T> delegate, long cacheSize, long timeout, TimeUnit timeUnit)
public void validate(T credentials)
Authenticator
CredentialsException
in case of failure.validate
in interface Authenticator<T extends HttpCredentials>
credentials
- the given credentials.public void setDelegate(Authenticator<T> delegate)
public Authenticator<T> getDelegate()
public void removeFromCache(T credentials)
public boolean isCached(T credentials)
public boolean clearCache()
Copyright © 2016. All rights reserved.