public class HttpClientSecurityParameters extends Object
Modifier and Type | Field and Description |
---|---|
private X509Credential |
clientTLSCredential
The X509 credential used for client TLS.
|
private CredentialsProvider |
credentialsProvider
HttpClient credentials provider.
|
private X509HostnameVerifier |
hostnameVerifier
The hostname verifier.
|
private List<String> |
tlsCipherSuites
TLS cipher suites.
|
private CriteriaSet |
tlsCriteriaSet
Optional criteria set used in evaluating server TLS credentials.
|
private List<String> |
tlsProtocols
TLS Protocols.
|
private TrustEngine<? super X509Credential> |
tlsTrustEngine
Optional trust engine used in evaluating server TLS credentials.
|
Constructor and Description |
---|
HttpClientSecurityParameters() |
Modifier and Type | Method and Description |
---|---|
X509Credential |
getClientTLSCredential()
Get the optional client TLS credential.
|
CredentialsProvider |
getCredentialsProvider()
Get an instance of
CredentialsProvider used for authentication by the HttpClient instance. |
X509HostnameVerifier |
getHostnameVerifier()
Get the optional hostname verifier.
|
List<String> |
getTLSCipherSuites()
Get the optional list of TLS cipher suites.
|
CriteriaSet |
getTLSCriteriaSet()
Get the optional criteria set used in evaluating server TLS credentials.
|
List<String> |
getTLSProtocols()
Get the optional list of TLS protocols.
|
TrustEngine<? super X509Credential> |
getTLSTrustEngine()
Sets the optional trust engine used in evaluating server TLS credentials.
|
void |
setBasicCredentials(UsernamePasswordCredentials credentials)
A convenience method to set a (single) username and password used for BASIC authentication.
|
void |
setBasicCredentialsWithScope(UsernamePasswordCredentials credentials,
AuthScope scope)
A convenience method to set a (single) username and password used for BASIC authentication.
|
void |
setClientTLSCredential(X509Credential credential)
Set the optional client TLS credential.
|
void |
setCredentialsProvider(CredentialsProvider provider)
Set an instance of
CredentialsProvider used for authentication by the HttpClient instance. |
void |
setHostnameVerifier(X509HostnameVerifier verifier)
Set the optional hostname verifier.
|
void |
setTLSCipherSuites(List<String> cipherSuites)
Set the optional list of TLS cipher suites.
|
void |
setTLSCriteriaSet(CriteriaSet criteriaSet)
Set the optional criteria set used in evaluating server TLS credentials.
|
void |
setTLSProtocols(List<String> protocols)
Set the optional list of TLS protocols.
|
void |
setTLSTrustEngine(TrustEngine<? super X509Credential> engine)
Sets the optional trust engine used in evaluating server TLS credentials.
|
private CredentialsProvider credentialsProvider
private TrustEngine<? super X509Credential> tlsTrustEngine
private CriteriaSet tlsCriteriaSet
private X509HostnameVerifier hostnameVerifier
private X509Credential clientTLSCredential
@Nullable public CredentialsProvider getCredentialsProvider()
CredentialsProvider
used for authentication by the HttpClient instance.public void setCredentialsProvider(@Nullable CredentialsProvider provider)
CredentialsProvider
used for authentication by the HttpClient instance.provider
- the credentials providerpublic void setBasicCredentials(@Nullable UsernamePasswordCredentials credentials)
An AuthScope
will be generated which specifies any host, port, scheme and realm.
To specify multiple usernames and passwords for multiple host, port, scheme, and realm combinations, instead
provide an instance of CredentialsProvider
via setCredentialsProvider(CredentialsProvider)
.
credentials
- the username and password credentialspublic void setBasicCredentialsWithScope(@Nullable UsernamePasswordCredentials credentials, @Nullable AuthScope scope)
If the authScope
is null, an AuthScope
will be generated which specifies
any host, port, scheme and realm.
To specify multiple usernames and passwords for multiple host, port, scheme, and realm combinations, instead
provide an instance of CredentialsProvider
via setCredentialsProvider(CredentialsProvider)
.
credentials
- the username and password credentialsscope
- the HTTP client auth scope with which to scope the credentials, may be null@Nullable public TrustEngine<? super X509Credential> getTLSTrustEngine()
public void setTLSTrustEngine(@Nullable TrustEngine<? super X509Credential> engine)
engine
- the trust engine instance to use@Nullable public CriteriaSet getTLSCriteriaSet()
public void setTLSCriteriaSet(@Nullable CriteriaSet criteriaSet)
criteriaSet
- the new criteria set instance to use@Nullable public List<String> getTLSProtocols()
public void setTLSProtocols(@Nullable List<String> protocols)
protocols
- the TLS protocols or null@Nullable public List<String> getTLSCipherSuites()
public void setTLSCipherSuites(@Nullable List<String> cipherSuites)
cipherSuites
- the TLS cipher suites, or null@Nullable public X509HostnameVerifier getHostnameVerifier()
public void setHostnameVerifier(@Nullable X509HostnameVerifier verifier)
verifier
- the hostname verifier, or null@Nullable public X509Credential getClientTLSCredential()
public void setClientTLSCredential(@Nullable X509Credential credential)
credential
- the client TLS credential, or nullCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.