Class ProcessRequestedAuthnContext
- 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.saml.saml2.profile.impl.ProcessRequestedAuthnContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ProcessRequestedAuthnContext extends AbstractAuthenticationAction
An authentication action that processes theRequestedAuthnContextin a SAML 2AuthnRequest, and populates aRequestedPrincipalContextwith the corresponding information.If this feature is disallowed by profile configuration, then an error event is signaled.
Each requested context class or declaration reference is translated into a custom
Principalfor use by the authentication subsystem to drive flow selection.
-
-
Field Summary
Fields Modifier and Type Field Description private AuthnRequestauthnRequestThe request message to read from.private Function<ProfileRequestContext,AuthnRequest>authnRequestLookupStrategyLookup strategy function for obtainingAuthnRequest.private Set<String>ignoredContextsContext URIs to ignore in a request.private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,RelyingPartyContext>relyingPartyContextLookupStrategyStrategy used to look up aRelyingPartyContextfor configuration options.
-
Constructor Summary
Constructors Constructor Description ProcessRequestedAuthnContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext)voidsetAuthnRequestLookupStrategy(Function<ProfileRequestContext,AuthnRequest> strategy)Set the strategy used to locate theAuthnRequestto read from.voidsetIgnoredContexts(Collection<String> contexts)Set the context class or declaration URIs to ignore if found in a request.voidsetRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)Set the strategy used to return theRelyingPartyContextfor configuration options.-
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, doInitialize, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Strategy used to look up aRelyingPartyContextfor configuration options.
-
authnRequestLookupStrategy
@Nonnull private Function<ProfileRequestContext,AuthnRequest> authnRequestLookupStrategy
Lookup strategy function for obtainingAuthnRequest.
-
ignoredContexts
@Nonnull @NonnullElements private Set<String> ignoredContexts
Context URIs to ignore in a request.
-
authnRequest
@Nullable private AuthnRequest authnRequest
The request message to read from.
-
-
Method Detail
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)Set the strategy used to return theRelyingPartyContextfor configuration options.- Parameters:
strategy- lookup strategy- Since:
- 3.3.0
-
setAuthnRequestLookupStrategy
public void setAuthnRequestLookupStrategy(@Nonnull Function<ProfileRequestContext,AuthnRequest> strategy)Set the strategy used to locate theAuthnRequestto read from.- Parameters:
strategy- lookup strategy
-
setIgnoredContexts
public void setIgnoredContexts(@Nonnull @NonnullElements Collection<String> contexts)
Set the context class or declaration URIs to ignore if found in a request.This defaults to only
AuthnContext.UNSPECIFIED_AUTHN_CTX.- Parameters:
contexts- contexts to ignore
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)- Overrides:
doPreExecutein classAbstractAuthenticationAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)- Overrides:
doExecutein classAbstractAuthenticationAction
-
-