Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.auth

public Class SystemDefaultCredentialsProvider

extends Object
implements CredentialsStore
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.auth.CredentialsStore, org.apache.hc.client5.http.auth.CredentialsProvider
Annotations
@Contract
threading:SAFE
@SuppressWarnings:deprecation
Imports
java.net.Authenticator, .MalformedURLException, .PasswordAuthentication, .URI, .URISyntaxException, .URL, org.apache.hc.client5.http.auth.AuthScope, .Credentials, .CredentialsStore, .StandardAuthScheme, .UsernamePasswordCredentials, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.HttpRequest, .URIScheme, org.apache.hc.core5.http.protocol.HttpContext, org.apache.hc.core5.util.Args

Implementation of CredentialsStore backed by standard JRE Authenticator.
Since
4.3

Field Summary

Modifier and TypeField and Description
private final BasicCredentialsProvider

Constructor Summary

AccessConstructor and Description
public
SystemDefaultCredentialsProvider()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
public Credentials
getCredentials(final AuthScope authScope, final HttpContext context)

Implements org.apache.hc.client5.http.auth.CredentialsProvider.getCredentials.

Returns credentials for the given authentication scope, if available.
private static PasswordAuthentication
getProxyCredentials(final String protocol, final AuthScope authScope)

private static PasswordAuthentication
getSystemCreds(final String protocol, final AuthScope authScope, final Authenticator.RequestorType requestorType, final HttpClientContext context)

public void
setCredentials(final AuthScope authScope, final Credentials
the authentication credentials for the given scope.
credentials
)

Implements org.apache.hc.client5.http.auth.CredentialsStore.setCredentials.

Sets the credentials for the given authentication scope.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

internalback to summary
private final BasicCredentialsProvider internal

Constructor Detail

SystemDefaultCredentialsProviderback to summary
public SystemDefaultCredentialsProvider()

Default constructor.

Method Detail

clearback to summary
public void clear()

Implements org.apache.hc.client5.http.auth.CredentialsStore.clear.

Doc from org.apache.hc.client5.http.auth.CredentialsStore.clear.

Clears all credentials.

Annotations
@Override
getCredentialsback to summary
public Credentials getCredentials(final AuthScope authScope, final HttpContext context)

Implements org.apache.hc.client5.http.auth.CredentialsProvider.getCredentials.

Doc from org.apache.hc.client5.http.auth.CredentialsProvider.getCredentials.

Returns credentials for the given authentication scope, if available.

Parameters
authScope:AuthScope

the authentication scope

context:HttpContext

the http context

Returns:Credentials

the credentials

Annotations
@Override
getProxyCredentialsback to summary
private static PasswordAuthentication getProxyCredentials(final String protocol, final AuthScope authScope)
getSystemCredsback to summary
private static PasswordAuthentication getSystemCreds(final String protocol, final AuthScope authScope, final Authenticator.RequestorType requestorType, final HttpClientContext context)
setCredentialsback to summary
public void setCredentials(final AuthScope authScope, final Credentials credentials)

Implements org.apache.hc.client5.http.auth.CredentialsStore.setCredentials.

Doc from org.apache.hc.client5.http.auth.CredentialsStore.setCredentials.

Sets the credentials for the given authentication scope. Any previous credentials for the given scope will be overwritten.

Parameters
authScope:AuthScope

the authentication scope

credentials:Credentials

the authentication credentials for the given scope.

Annotations
@Override