Package org.apache.http.client
Interface CredentialsProvider
- All Known Implementing Classes:
BasicCredentialsProvider,SystemDefaultCredentialsProvider
public interface CredentialsProvider
Abstract credentials provider that maintains a collection of user
credentials.
Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.
- Since:
- 4.0
-
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.
-
Method Details
-
setCredentials
Sets thecredentialsfor the given authentication scope. Any previous credentials for the given scope will be overwritten.- Parameters:
authscope- theauthentication scopecredentials- the authenticationcredentialsfor the given scope.- See Also:
-
getCredentials
Get thecredentialsfor the given authentication scope.- Parameters:
authscope- theauthentication scope- Returns:
- the credentials
- See Also:
-
clear
void clear()Clears all credentials.
-