public class FilterFlowsByAttribute extends AbstractAuthenticationAction
IdPAttribute's
values to the custom principals supported by each flow.
It optionally (and by default) filters out active AuthenticationResult objects from possible reuse
for SSO.
The type of principals is ignored, and only string-based values of an attribute are supported.
EventIds.PROCEED_EVENT_IDProfileRequestContext.getSubcontext(AuthenticationContext.class) != null
| Modifier and Type | Field and Description |
|---|---|
private IdPAttribute |
attribute
The attribute to match against.
|
private com.google.common.base.Function<ProfileRequestContext,AttributeContext> |
attributeContextLookupStrategy
Lookup strategy for locating
AttributeContext. |
private String |
attributeId
The attribute ID to look for.
|
private boolean |
filterActiveResults
Whether to also filter active results to limit SSO.
|
private org.slf4j.Logger |
log
Class logger.
|
| Constructor and Description |
|---|
FilterFlowsByAttribute()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
private String |
getMatch(AuthenticationFlowDescriptor flow)
Compare the flow's custom principal names to the string values of the attribute.
|
private String |
getMatch(AuthenticationResult result)
Compare the result's custom principal names to the string values of the attribute.
|
void |
setAttributeContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,AttributeContext> strategy)
Set the lookup strategy for the
AttributeContext. |
void |
setAttributeId(String id)
Set the attribute ID to look for.
|
void |
setFilterActiveResults(boolean flag)
Set whether to filter active results (those usable for SSO) as well as inactive flows.
|
doExecute, 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 private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
AttributeContext.private boolean filterActiveResults
@Nullable private IdPAttribute attribute
public void setAttributeContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,AttributeContext> strategy)
AttributeContext.strategy - lookup strategypublic void setAttributeId(@Nullable String id)
id - attribute ID to look forpublic void setFilterActiveResults(boolean flag)
Defaults to true
flag - flag to setprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doPreExecute in class AbstractAuthenticationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nullable private String getMatch(@Nonnull AuthenticationFlowDescriptor flow)
flow - flow to examine@Nullable private String getMatch(@Nonnull AuthenticationResult result)
result - result to examineCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.