Package net.shibboleth.idp.authn.impl
Class ValidateFunctionResult
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.authn.AbstractAuthenticationAction
-
- net.shibboleth.idp.authn.AbstractValidationAction
-
- net.shibboleth.idp.authn.impl.ValidateFunctionResult
-
- All Implemented Interfaces:
net.shibboleth.idp.authn.principal.PrincipalSupportingComponent,net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,org.opensaml.profile.action.ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ValidateFunctionResult extends net.shibboleth.idp.authn.AbstractValidationActionAn action that executes a deployer-supplied function and produces anAuthenticationResultbased on the function result.- Since:
- 3.4.0
- Event:
EventIds.PROCEED_EVENT_ID,AuthnEventIds.INVALID_CREDENTIALS,AuthnEventIds.NO_CREDENTIALS- Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class).getAttemptedFlow() != null
- Postcondition:
- If the function returns a String, Principal, or Subject, an
AuthenticationResultis saved to theAuthenticationContext.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringDEFAULT_METRIC_NAMEDefault prefix for metrics.private org.slf4j.LoggerlogClass logger.private ObjectresultAuthentication result.private Function<org.opensaml.profile.context.ProfileRequestContext,?>resultLookupStrategyFunction to evaluate.
-
Constructor Summary
Constructors Constructor Description ValidateFunctionResult()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext, net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)protected voiddoInitialize()protected SubjectpopulateSubject(Subject subject)voidsetResultLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,?> strategy)Set the function to execute to produce the authentication result.-
Methods inherited from class net.shibboleth.idp.authn.AbstractValidationAction
addDefaultPrincipals, buildAuthenticationResult, doPreExecute, getClassifiedErrors, getMetricName, getRequesterLookupStrategy, getResponderLookupStrategy, getResultCachingPredicate, getSubject, getSupportedPrincipals, handleError, handleError, handleWarning, recordFailure, recordSuccess, setAddDefaultPrincipals, setClassifiedMessages, setMetricName, setRequesterLookupStrategy, setResponderLookupStrategy, setResultCachingPredicate, setSupportedPrincipals
-
Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategy
-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
DEFAULT_METRIC_NAME
@Nonnull @NotEmpty private static final String DEFAULT_METRIC_NAME
Default prefix for metrics.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
resultLookupStrategy
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,?> resultLookupStrategy
Function to evaluate.
-
result
@Nullable private Object result
Authentication result.
-
-
Method Detail
-
setResultLookupStrategy
public void setResultLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,?> strategy)Set the function to execute to produce the authentication result.The function can return a
String, aPrincipal, or aSubject.- Parameters:
strategy- result strategy
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.utilities.java.support.component.AbstractInitializableComponent- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
-
doExecute
protected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)- Overrides:
doExecutein classnet.shibboleth.idp.authn.AbstractAuthenticationAction
-
-