public final class HttpClientSecuritySupport extends Object
HttpClient
security features.Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG
Logger.
|
Modifier | Constructor and Description |
---|---|
private |
HttpClientSecuritySupport()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
addDefaultTLSTrustEngineCriteria(org.apache.http.client.protocol.HttpClientContext context,
org.apache.http.client.methods.HttpUriRequest request)
Add default trust engine criteria for TLS usage to the
HttpClientContext . |
static void |
checkTLSCredentialEvaluated(org.apache.http.client.protocol.HttpClientContext context,
String scheme)
Check that trust engine evaluation of the server TLS credential was actually performed when the
scheme is HTTPS.
|
static void |
marshalSecurityParameters(org.apache.http.client.protocol.HttpClientContext context,
HttpClientSecurityParameters securityParameters)
Marshal the supplied
HttpClientSecurityParameters to the supplied HttpClientContext . |
static void |
marshalSecurityParameters(org.apache.http.client.protocol.HttpClientContext context,
HttpClientSecurityParameters securityParameters,
boolean replace)
Marshal the supplied
HttpClientSecurityParameters to the supplied HttpClientContext . |
static void |
setContextValue(org.apache.http.client.protocol.HttpClientContext context,
String attributeName,
Object attributeValue,
boolean replace)
Set the supplied attribute value in the client context.
|
public static void addDefaultTLSTrustEngineCriteria(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nonnull org.apache.http.client.methods.HttpUriRequest request)
HttpClientContext
.context
- the current HTTP context instance in userequest
- the current HTTP requestpublic static void checkTLSCredentialEvaluated(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nonnull String scheme) throws SSLPeerUnverifiedException
context
- the current HTTP context instance in usescheme
- the HTTP request schemeSSLPeerUnverifiedException
- thrown if the TLS credential was not actually evaluated by the trust enginepublic static void marshalSecurityParameters(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nullable HttpClientSecurityParameters securityParameters)
HttpClientSecurityParameters
to the supplied HttpClientContext
.
Existing context values will NOT be replaced by non-null parameter values.
context
- the client context instancesecurityParameters
- the security parameters instancepublic static void marshalSecurityParameters(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nullable HttpClientSecurityParameters securityParameters, boolean replace)
HttpClientSecurityParameters
to the supplied HttpClientContext
.context
- the client context instancesecurityParameters
- the security parameters instancereplace
- whether a non-null security parameter value should replace an existing context valuepublic static void setContextValue(@Nonnull org.apache.http.client.protocol.HttpClientContext context, @Nonnull String attributeName, @Nullable Object attributeValue, boolean replace)
context
- the client context instanceattributeName
- the context attribute name toattributeValue
- the context attribute value to set, may be nullreplace
- whether a non-null argument value should replace an existing context valueCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.