@ThreadSafe public abstract class AbstractDuoAuthenticator extends AbstractInitializableComponent
| Modifier and Type | Field and Description |
|---|---|
private HttpClient |
httpClient
HttpClient for contacting Duo.
|
private HttpClientSecurityParameters |
httpClientSecurityParameters
HTTP client security parameters.
|
private com.fasterxml.jackson.databind.ObjectMapper |
objectMapper
JSON object mapper.
|
| Constructor and Description |
|---|
AbstractDuoAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends DuoResponseWrapper<?>> |
doAPIRequest(HttpUriRequest request,
com.fasterxml.jackson.core.type.TypeReference<T> wrapperTypeRef)
Performs a call to the Duo AuthAPI.
|
protected void |
doInitialize() |
void |
setHttpClient(HttpClient client)
Set the
HttpClient to use for contacting Duo. |
void |
setHttpClientSecurityParameters(HttpClientSecurityParameters params)
Set the optional client security parameters.
|
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Set the JSON
ObjectMapper. |
destroy, doDestroy, initialize, isDestroyed, isInitialized@NonnullAfterInit private HttpClient httpClient
@Nullable private HttpClientSecurityParameters httpClientSecurityParameters
@NonnullAfterInit private com.fasterxml.jackson.databind.ObjectMapper objectMapper
public void setHttpClient(@Nonnull HttpClient client)
HttpClient to use for contacting Duo.client - HttpClientpublic void setHttpClientSecurityParameters(@Nullable HttpClientSecurityParameters params)
params - the new client security parameterspublic void setObjectMapper(@Nonnull com.fasterxml.jackson.databind.ObjectMapper mapper)
ObjectMapper.mapper - object mapperprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected <T extends DuoResponseWrapper<?>> T doAPIRequest(@Nonnull HttpUriRequest request, @Nonnull com.fasterxml.jackson.core.type.TypeReference<T> wrapperTypeRef) throws com.duosecurity.duoweb.DuoWebException, ClientProtocolException, IOException
DuoResponseWrapper.T - the DuoResponse type being wrappedrequest - the prepared HTTP requestwrapperTypeRef - the type of DuoResponseWrapper to useDuoResponseWrapperIOException - on an I/O errorClientProtocolException - on an HTTP errorcom.duosecurity.duoweb.DuoWebException - on a Duo-related errorCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.