@Contract(threading=SAFE) public class BasicCredentialsProvider extends Object implements CredentialsProvider
CredentialsProvider
.Modifier and Type | Field and Description |
---|---|
private ConcurrentHashMap<AuthScope,Credentials> |
credMap |
Constructor and Description |
---|
BasicCredentialsProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all credentials.
|
Credentials |
getCredentials(AuthScope authscope)
Get the
credentials for the given authentication scope. |
private static Credentials |
matchCredentials(Map<AuthScope,Credentials> map,
AuthScope authscope)
Find matching
credentials for the given authentication scope. |
void |
setCredentials(AuthScope authscope,
Credentials credentials)
Sets the
credentials for the given authentication
scope. |
String |
toString() |
private final ConcurrentHashMap<AuthScope,Credentials> credMap
public BasicCredentialsProvider()
public void setCredentials(AuthScope authscope, Credentials credentials)
CredentialsProvider
credentials
for the given authentication
scope. Any previous credentials for the given scope will be overwritten.setCredentials
in interface CredentialsProvider
authscope
- the authentication scope
credentials
- the authentication credentials
for the given scope.CredentialsProvider.getCredentials(AuthScope)
private static Credentials matchCredentials(Map<AuthScope,Credentials> map, AuthScope authscope)
credentials
for the given authentication scope.map
- the credentials hash mapauthscope
- the authentication scope
public Credentials getCredentials(AuthScope authscope)
CredentialsProvider
credentials
for the given authentication scope.getCredentials
in interface CredentialsProvider
authscope
- the authentication scope
CredentialsProvider.setCredentials(AuthScope, Credentials)
public void clear()
CredentialsProvider
clear
in interface CredentialsProvider
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses