Class SystemDefaultCredentialsProvider
- java.lang.Object
-
- org.apache.hc.client5.http.impl.auth.SystemDefaultCredentialsProvider
-
- All Implemented Interfaces:
CredentialsProvider,CredentialsStore
@Contract(threading=SAFE) public class SystemDefaultCredentialsProvider extends java.lang.Object implements CredentialsStore
Implementation ofCredentialsStorebacked by standard JREAuthenticator.- Since:
- 4.3
-
-
Constructor Summary
Constructors Constructor Description SystemDefaultCredentialsProvider()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears all credentials.CredentialsgetCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.HttpContext context)Returnscredentialsfor the given authentication scope, if available.voidsetCredentials(AuthScope authScope, Credentials credentials)Sets thecredentialsfor the given authentication scope.
-
-
-
Method Detail
-
setCredentials
public void setCredentials(AuthScope authScope, Credentials credentials)
Description copied from interface:CredentialsStoreSets thecredentialsfor the given authentication scope. Any previous credentials for the given scope will be overwritten.- Specified by:
setCredentialsin interfaceCredentialsStore- Parameters:
authScope- theauthentication scopecredentials- the authenticationcredentialsfor the given scope.- See Also:
CredentialsProvider.getCredentials(AuthScope, org.apache.hc.core5.http.protocol.HttpContext)
-
getCredentials
public Credentials getCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.HttpContext context)
Description copied from interface:CredentialsProviderReturnscredentialsfor the given authentication scope, if available.- Specified by:
getCredentialsin interfaceCredentialsProvider- Parameters:
authScope- theauthentication scopecontext- thehttp context- Returns:
- the credentials
-
clear
public void clear()
Description copied from interface:CredentialsStoreClears all credentials.- Specified by:
clearin interfaceCredentialsStore
-
-