Package org.opensaml.security.httpclient

# Class HttpClientSecurityContextHandler

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.security.httpclient.HttpClientSecurityContextHandler

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `HttpClientContextHandler`

public class HttpClientSecurityContextHandler extends AbstractInitializableComponent implements HttpClientContextHandler
An `HttpClientContextHandler` that supports this package's security capabilities.

Since:
  3.4.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private HttpClientSecurityParameters`
`httpClientSecurityParameters`
HTTP client security parameters.

## Constructor Summary

Constructors
Constructor
Description
`HttpClientSecurityContextHandler()`

## Method Summary

Modifier and Type
Method
Description
`HttpClientSecurityParameters`
`getHttpClientSecurityParameters()`
Get the optional client security parameters.
`void`
`invokeAfter(org.apache.hc.client5.http.protocol.HttpClientContext context, org.apache.hc.core5.http.ClassicHttpRequest request)`
`void`
`invokeBefore(org.apache.hc.client5.http.protocol.HttpClientContext context, org.apache.hc.core5.http.ClassicHttpRequest request)`
`void`
`setHttpClientSecurityParameters(HttpClientSecurityParameters params)`
Set the optional client security parameters.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### httpClientSecurityParameters

@Nullable private HttpClientSecurityParameters httpClientSecurityParameters
HTTP client security parameters.

## Constructor Details

### HttpClientSecurityContextHandler

public HttpClientSecurityContextHandler()

## Method Details

### getHttpClientSecurityParameters

@Nullable public HttpClientSecurityParameters getHttpClientSecurityParameters()
Get the optional client security parameters.

Returns:
  the client security parameters

### setHttpClientSecurityParameters

public void setHttpClientSecurityParameters(@Nullable HttpClientSecurityParameters params)
Set the optional client security parameters.

Parameters:
  `params` - the new client security parameters

### invokeBefore

public void invokeBefore(@Nonnull org.apache.hc.client5.http.protocol.HttpClientContext context, @Nonnull org.apache.hc.core5.http.ClassicHttpRequest request) throws IOException

Specified by:
  `invokeBefore` in interface `HttpClientContextHandler`
Throws:
  `IOException`

### invokeAfter

public void invokeAfter(@Nonnull org.apache.hc.client5.http.protocol.HttpClientContext context, @Nonnull org.apache.hc.core5.http.ClassicHttpRequest request) throws IOException

Specified by:
  `invokeAfter` in interface `HttpClientContextHandler`
Throws:
  `IOException`