@Contract(threading=SAFE) public class SystemDefaultCredentialsProvider extends Object implements CredentialsStore
CredentialsStore
backed by standard
JRE Authenticator
.Constructor and Description |
---|
SystemDefaultCredentialsProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all credentials.
|
Credentials |
getCredentials(AuthScope authScope,
HttpContext context)
Returns
credentials for the given authentication scope,
if available. |
void |
setCredentials(AuthScope authScope,
Credentials credentials)
Sets the
credentials for the given authentication
scope. |
public SystemDefaultCredentialsProvider()
public void clear()
CredentialsStore
clear
in interface CredentialsStore
public Credentials getCredentials(AuthScope authScope, HttpContext context)
CredentialsProvider
credentials
for the given authentication scope,
if available.getCredentials
in interface CredentialsProvider
authScope
- the authentication scope
context
- the http context
public void setCredentials(AuthScope authScope, Credentials credentials)
CredentialsStore
credentials
for the given authentication
scope. Any previous credentials for the given scope will be overwritten.setCredentials
in interface CredentialsStore
authScope
- the authentication scope
credentials
- the authentication credentials
for the given scope.CredentialsProvider.getCredentials(AuthScope, org.apache.hc.core5.http.protocol.HttpContext)