@Contract(threading=SAFE) public class BasicCredentialsProvider extends 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,
org.apache.hc.core5.http.protocol.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. |
String |
toString() |
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)
public Credentials getCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.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 clear()
CredentialsStore
clear
in interface CredentialsStore
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.