Package net.shibboleth.idp.authn.context
Class MultiFactorAuthenticationContext
- java.lang.Object
-
- org.opensaml.messaging.context.BaseContext
-
- net.shibboleth.idp.authn.context.MultiFactorAuthenticationContext
-
- All Implemented Interfaces:
Iterable<BaseContext>
public final class MultiFactorAuthenticationContext extends BaseContext
A context that holds information about the intermediate state of the multi-factor login flow.- Since:
- 3.3.0
- Parent:
AuthenticationContext- Added:
- At the beginning of the multi-factor login flow
- Removed:
- At the end of the multi-factor login flow
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,AuthenticationResult>activeResultsAuthentication results that are active (may be generated earlier or during current request).private StringeventA SWF event to signal as the completion of the MFA flow.private AuthenticationFlowDescriptormfaFlowDescriptorLogin flow descriptor for the MFA flow.private StringnextFlowIdThe next flow due to execute (or the currently executing flow during subflow execution).private Map<String,MultiFactorAuthenticationTransition>transitionMapMap of login "factors" (flows) and the transition rules to run after them.
-
Constructor Summary
Constructors Constructor Description MultiFactorAuthenticationContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,AuthenticationResult>getActiveResults()Get a live list of theAuthenticationResultobjects produced during the flow.AuthenticationFlowDescriptorgetAuthenticationFlowDescriptor()Get theAuthenticationFlowDescriptorrepresenting the MFA flow.StringgetEvent()Get an event that should be signaled as the result of the MFA flow.StringgetNextFlowId()Get the next flow due to execute (or that is currently executing).Map<String,MultiFactorAuthenticationTransition>getTransitionMap()Get a live map of the transitions to apply.booleanisAcceptable()Get whether one or more of the active results in this context satisfies the request.MultiFactorAuthenticationContextsetAuthenticationFlowDescriptor(AuthenticationFlowDescriptor descriptor)Set theAuthenticationFlowDescriptorrepresenting the MFA flow.MultiFactorAuthenticationContextsetEvent(String e)Set an event that should be signaled as the result of the MFA flow.MultiFactorAuthenticationContextsetNextFlowId(String id)Set the next flow due to execute.MultiFactorAuthenticationContextsetTransitionMap(Map<String,MultiFactorAuthenticationTransition> map)Set the map of transitions to apply, replacing any existing entries.-
Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeSubcontext, removeSubcontext, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
transitionMap
@Nonnull @NonnullElements private Map<String,MultiFactorAuthenticationTransition> transitionMap
Map of login "factors" (flows) and the transition rules to run after them.
-
activeResults
@Nonnull @NonnullElements private final Map<String,AuthenticationResult> activeResults
Authentication results that are active (may be generated earlier or during current request).
-
mfaFlowDescriptor
@Nullable private AuthenticationFlowDescriptor mfaFlowDescriptor
Login flow descriptor for the MFA flow.
-
nextFlowId
@Nullable @NotEmpty private String nextFlowId
The next flow due to execute (or the currently executing flow during subflow execution).
-
-
Method Detail
-
getTransitionMap
@Nonnull @NonnullElements @Live public Map<String,MultiFactorAuthenticationTransition> getTransitionMap()
Get a live map of the transitions to apply.- Returns:
- map of transition logic
-
setTransitionMap
@Nonnull public MultiFactorAuthenticationContext setTransitionMap(@Nonnull Map<String,MultiFactorAuthenticationTransition> map)
Set the map of transitions to apply, replacing any existing entries.- Parameters:
map- map of transition logic- Returns:
- this context
-
getActiveResults
@Nonnull @NonnullElements @Live public Map<String,AuthenticationResult> getActiveResults()
Get a live list of theAuthenticationResultobjects produced during the flow.- Returns:
- list of results
-
getAuthenticationFlowDescriptor
@Nullable public AuthenticationFlowDescriptor getAuthenticationFlowDescriptor()
Get theAuthenticationFlowDescriptorrepresenting the MFA flow.- Returns:
- descriptor
-
setAuthenticationFlowDescriptor
@Nonnull public MultiFactorAuthenticationContext setAuthenticationFlowDescriptor(@Nullable AuthenticationFlowDescriptor descriptor)
Set theAuthenticationFlowDescriptorrepresenting the MFA flow.- Parameters:
descriptor- login flow descriptor- Returns:
- this context
-
getNextFlowId
@Nullable @NotEmpty public String getNextFlowId()
Get the next flow due to execute (or that is currently executing).- Returns:
- the ID of the next flow to execute
-
setNextFlowId
@Nonnull public MultiFactorAuthenticationContext setNextFlowId(@Nullable @NotEmpty String id)
Set the next flow due to execute.- Parameters:
id- flow ID- Returns:
- this context
-
getEvent
@Nullable @NotEmpty public String getEvent()
Get an event that should be signaled as the result of the MFA flow.If set, the MFA flow will eventually terminate with this event once all transitions have completed.
- Returns:
- event to signal
-
setEvent
@Nonnull public MultiFactorAuthenticationContext setEvent(@Nullable @NotEmpty String e)
Set an event that should be signaled as the result of the MFA flow.- Parameters:
e- event to signal- Returns:
- this context
-
isAcceptable
public boolean isAcceptable()
Get whether one or more of the active results in this context satisfies the request.- Returns:
- true iff at least one of the active results satisfies the request
-
-