Top Description Fields Constructors Methods
org.apache.http.impl.client

public Class SystemDefaultCredentialsProvider

extends Object
implements CredentialsProvider
Class Inheritance
All Implemented Interfaces
org.apache.http.client.CredentialsProvider
Annotations
@Contract
threading:SAFE
Imports
java.net.Authenticator, .PasswordAuthentication, java.util.Locale, .Map, java.util.concurrent.ConcurrentHashMap, org.apache.http.HttpHost, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.auth.AuthScope, .Credentials, .NTCredentials, .UsernamePasswordCredentials, org.apache.http.client.CredentialsProvider, org.apache.http.client.config.AuthSchemes, org.apache.http.util.Args

Implementation of CredentialsProvider backed by standard JRE Authenticator.
Since
4.3

Field Summary

Modifier and TypeField and Description
private final BasicCredentialsProvider
private static final Map<String, String>

Constructor Summary

AccessConstructor and Description
public
SystemDefaultCredentialsProvider()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Implements org.apache.http.client.CredentialsProvider.clear.

Clears all credentials.
public Credentials
getCredentials(final AuthScope authscope)

Implements org.apache.http.client.CredentialsProvider.getCredentials.

Get the credentials for the given authentication scope.
private static PasswordAuthentication
getProxyCredentials(final String protocol, final AuthScope authscope)

private static PasswordAuthentication
getSystemCreds(final String protocol, final AuthScope authscope, final Authenticator.RequestorType requestorType)

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

Implements org.apache.http.client.CredentialsProvider.setCredentials.

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

Field Detail

internalback to summary
private final BasicCredentialsProvider internal
SCHEME_MAPback to summary
private static final Map<String, String> SCHEME_MAP

Constructor Detail

SystemDefaultCredentialsProviderback to summary
public SystemDefaultCredentialsProvider()

Default constructor.

Method Detail

clearback to summary
public void clear()

Implements org.apache.http.client.CredentialsProvider.clear.

Doc from org.apache.http.client.CredentialsProvider.clear.

Clears all credentials.

Annotations
@Override
getCredentialsback to summary
public Credentials getCredentials(final AuthScope authscope)

Implements org.apache.http.client.CredentialsProvider.getCredentials.

Doc from org.apache.http.client.CredentialsProvider.getCredentials.

Get the credentials for the given authentication scope.

Parameters
authscope:AuthScope

the authentication scope

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)
setCredentialsback to summary
public void setCredentials(final AuthScope authscope, final Credentials credentials)

Implements org.apache.http.client.CredentialsProvider.setCredentials.

Doc from org.apache.http.client.CredentialsProvider.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
translateSchemeback to summary
private static String translateScheme(final String key)