public class BasicCredentialsProvider extends java.lang.Object implements CredentialsStore
CredentialsStore.| Constructor and Description |
|---|
BasicCredentialsProvider()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all credentials.
|
Credentials |
getCredentials(AuthScope authScope,
HttpContext httpContext)
Returns
credentials for the given authentication scope,
if available. |
void |
setCredentials(AuthScope authScope,
Credentials credentials)
Sets the
credentials for the given authentication
scope. |
java.lang.String |
toString() |
public void setCredentials(AuthScope authScope, Credentials credentials)
CredentialsStorecredentials for the given authentication
scope. Any previous credentials for the given scope will be overwritten.setCredentials in interface CredentialsStoreauthScope - the authentication scopecredentials - the authentication credentials
for the given scope.#getCredentials(AuthScope, org.apache.hc.core5.http.protocol.HttpContext)public Credentials getCredentials(AuthScope authScope, HttpContext httpContext)
CredentialsProvidercredentials for the given authentication scope,
if available.getCredentials in interface CredentialsProviderauthScope - the authentication scopehttpContext - the http contextpublic void clear()
CredentialsStoreclear in interface CredentialsStorepublic java.lang.String toString()
toString in class java.lang.Object