public class ValidateDuoWebResponse extends AbstractValidationAction
AuthenticationResult or records error state.
The username to cross-check comes from a lookup strategy, by default a CanonicalUsernameLookupStrategy
that returns a username produced by an earlier authentication flow, and on success the same name is populated into
a SubjectCanonicalizationContext as a pre-established result for the login flow.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.NO_CREDENTIALS| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAULT_METRIC_NAME
Default prefix for metrics.
|
private DuoIntegration |
duoIntegration
Duo integration to use.
|
private com.google.common.base.Function<ProfileRequestContext,DuoIntegration> |
duoIntegrationLookupStrategy
Lookp strategy for Duo integration.
|
private org.slf4j.Logger |
log
Class logger.
|
static String |
RESPONSE_PARAM
Signed response parameter name.
|
private String |
signedResponse
Signed response string.
|
private String |
username
Attempted username.
|
private com.google.common.base.Function<ProfileRequestContext,String> |
usernameLookupStrategy
Lookup strategy for username to match against Duo identity.
|
| Constructor and Description |
|---|
ValidateDuoWebResponse()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildAuthenticationResult(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected Subject |
populateSubject(Subject subject) |
void |
setDuoIntegration(DuoIntegration duo)
Set DuoIntegration details to use directly.
|
void |
setDuoIntegrationLookupStrategy(com.google.common.base.Function<ProfileRequestContext,DuoIntegration> strategy)
Set DuoIntegration lookup strategy to use.
|
void |
setUsernameLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the lookup strategy to use for the username to match against Duo identity.
|
addDefaultPrincipals, getClassifiedErrors, getMetricName, getResultCachingPredicate, getSubject, getSupportedPrincipals, handleError, handleError, handleWarning, recordFailure, recordSuccess, setAddDefaultPrincipals, setClassifiedMessages, setMetricName, setRequesterLookupStrategy, setResponderLookupStrategy, setResultCachingPredicate, setSupportedPrincipalsdoExecute, doPreExecute, setLookupStrategydoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull @NotEmpty public static final String RESPONSE_PARAM
@Nonnull @NotEmpty private static final String DEFAULT_METRIC_NAME
@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,DuoIntegration> duoIntegrationLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,String> usernameLookupStrategy
@Nullable private DuoIntegration duoIntegration
public void setDuoIntegrationLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,DuoIntegration> strategy)
strategy - lookup strategypublic void setDuoIntegration(@Nonnull DuoIntegration duo)
duo - Duo integration detailspublic void setUsernameLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy - lookup strategyprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doPreExecute in class AbstractValidationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationActionprotected Subject populateSubject(@Nonnull Subject subject)
populateSubject in class AbstractValidationActionprotected void buildAuthenticationResult(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
buildAuthenticationResult in class AbstractValidationActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.