Class DuoSDKClientFactory
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.authn.duo.sdk.impl.DuoSDKClientFactory
- All Implemented Interfaces:
DuoOIDCClientFactory,Component,DestructableComponent,InitializableComponent
@ThreadSafe
public final class DuoSDKClientFactory
extends AbstractInitializableComponent
implements DuoOIDCClientFactory
Abstract factory implementation for the
DuoSDKClientAdaptor.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(DuoOIDCIntegration integration) Create anDuoOIDCClientinstance from the supplied integration.Get the caCerts, guarded by this objects monitor.private StringGet the HTTP proxy host, guarded by this objects monitor.private IntegerGet the HTTP proxy port, guarded by this objects monitor.voidsetCaCerts(List<String> certs) Sets the list of CA certificate pins used to verify the Duo client connection to the API host.voidsetProxyHost(String host) Set the HTTP proxy host, guarded by this objects monitor.voidsetProxyPort(Integer port) Set the HTTP proxy port, guarded by this objects monitor.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
caCerts
List of CA Certificate pins. If null, the client's default set are used. -
proxyHost
The optional HTTP proxy hostname. -
proxyPort
The optional HTTP proxy port number.
-
-
Constructor Details
-
DuoSDKClientFactory
public DuoSDKClientFactory()
-
-
Method Details
-
setCaCerts
Sets the list of CA certificate pins used to verify the Duo client connection to the API host. Ifnull, the client will use the internal defaults.- Parameters:
certs- the list of certificate pins.
-
getCaCerts
Get the caCerts, guarded by this objects monitor.- Returns:
- the caCerts.
-
setProxyHost
Set the HTTP proxy host, guarded by this objects monitor.- Parameters:
host- the proxy host to set.- Since:
- 2.2.0
-
getProxyHost
Get the HTTP proxy host, guarded by this objects monitor.- Returns:
- the proxy host.
- Since:
- 2.2.0
-
setProxyPort
Set the HTTP proxy port, guarded by this objects monitor.- Parameters:
port- the proxy port to set.- Since:
- 2.2.0
-
getProxyPort
Get the HTTP proxy port, guarded by this objects monitor.- Returns:
- the proxy port.
- Since:
- 2.2.0
-
createInstance
@Nonnull public DuoOIDCClient createInstance(@Nonnull DuoOIDCIntegration integration) throws DuoClientException Description copied from interface:DuoOIDCClientFactoryCreate anDuoOIDCClientinstance from the supplied integration.The client should be fully initialised and safely published.
- Specified by:
createInstancein interfaceDuoOIDCClientFactory- Parameters:
integration- the duo integration used to instantiate the client.- Returns:
- the created Duo client, never
null. - Throws:
DuoClientException- if there is an error creating the Duo client.
-