Class ProcessAssertionsForAuthentication
java.lang.Object
net.shibboleth.shared.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.saml.saml2.profile.impl.ProcessAssertionsForAuthentication
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Perform processing of a SAML 2 Response's Assertions that have been validated by earlier actions
for use in finalization of SAML-based authentication by later actions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classPredicate for assertions containing at least 1 AuthenticationStatement.private final classPredicate for assertions which have been validated and have a confirmed Subject.private final classPredicate for valid assertions.private final classThe default response resolver function. -
Field Summary
FieldsModifier and TypeFieldDescriptionSelection strategy for multiple valid authn Assertions.private Function<Assertion,AuthnStatement> Selection strategy for multiple AuthnStatements.private final org.slf4j.LoggerLogger.private ResponseThe Response to process.private Function<ProfileRequestContext,Response> The resolver for the response to be processed.private SAMLAuthnContextThe SAML authentication context.Lookup strategy to locate the SAML context. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) Performs this authentication action.protected booleandoPreExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) Performs this authentication action's pre-execute step.voidsetAuthnAssertionSelectionStrategy(Function<List<Assertion>, Assertion> strategy) Set the strategy function for selecting which of multiple valid Assertions to use.voidSet the strategy function for selecting which of multiple AuthnStatements to use.voidsetResponseResolver(Function<ProfileRequestContext, Response> strategy) Set the strategy function which resolves the response to process.voidSet the lookup strategy used to locate theSAMLAuthnContext.Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategyMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
responseResolver
The resolver for the response to be processed. -
samlContextLookupStrategy
Lookup strategy to locate the SAML context. -
authnAssertionSelectionStrategy
Selection strategy for multiple valid authn Assertions. -
authnStatementSelectionStrategy
Selection strategy for multiple AuthnStatements. -
response
The Response to process. -
samlAuthnContext
The SAML authentication context.
-
-
Constructor Details
-
ProcessAssertionsForAuthentication
public ProcessAssertionsForAuthentication()Constructor.
-
-
Method Details
-
setAuthnAssertionSelectionStrategy
public void setAuthnAssertionSelectionStrategy(@Nonnull Function<List<Assertion>, Assertion> strategy) Set the strategy function for selecting which of multiple valid Assertions to use.- Parameters:
strategy- the new strategy function
-
setAuthnStatementSelectionStrategy
public void setAuthnStatementSelectionStrategy(@Nonnull Function<Assertion, AuthnStatement> strategy) Set the strategy function for selecting which of multiple AuthnStatements to use.- Parameters:
strategy- the new strategy function
-
setResponseResolver
Set the strategy function which resolves the response to process.- Parameters:
strategy- the new strategy function
-
setSAMLAuthnContextLookupStrategy
public void setSAMLAuthnContextLookupStrategy(@Nonnull Function<ProfileRequestContext, SAMLAuthnContext> strategy) Set the lookup strategy used to locate theSAMLAuthnContext.- Parameters:
strategy- the new strategy function
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) Performs this authentication action's pre-execute step. Default implementation just returns true.- Overrides:
doPreExecutein classAbstractAuthenticationAction- Parameters:
profileRequestContext- the current IdP profile request contextauthenticationContext- the current authentication context- Returns:
- true iff execution should continue
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) Performs this authentication action. Default implementation throws an exception.- Overrides:
doExecutein classAbstractAuthenticationAction- Parameters:
profileRequestContext- the current IdP profile request contextauthenticationContext- the current authentication context
-