Package org.apache.http.impl.client
Class BasicCredentialsProvider
java.lang.Object
org.apache.http.impl.client.BasicCredentialsProvider
- All Implemented Interfaces:
CredentialsProvider
@Contract(threading=SAFE)
public class BasicCredentialsProvider
extends Object
implements CredentialsProvider
Default implementation of
CredentialsProvider.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all credentials.getCredentials(AuthScope authscope) Get thecredentialsfor the given authentication scope.voidsetCredentials(AuthScope authscope, Credentials credentials) Sets thecredentialsfor the given authentication scope.toString()
-
Constructor Details
-
BasicCredentialsProvider
public BasicCredentialsProvider()Default constructor.
-
-
Method Details
-
setCredentials
Description copied from interface:CredentialsProviderSets thecredentialsfor the given authentication scope. Any previous credentials for the given scope will be overwritten.- Specified by:
setCredentialsin interfaceCredentialsProvider- Parameters:
authscope- theauthentication scopecredentials- the authenticationcredentialsfor the given scope.- See Also:
-
getCredentials
Description copied from interface:CredentialsProviderGet thecredentialsfor the given authentication scope.- Specified by:
getCredentialsin interfaceCredentialsProvider- Parameters:
authscope- theauthentication scope- Returns:
- the credentials
- See Also:
-
clear
public void clear()Description copied from interface:CredentialsProviderClears all credentials.- Specified by:
clearin interfaceCredentialsProvider
-
toString
-