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>
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
FieldsModifier and TypeFieldDescriptionprivate final Map<String,
AuthenticationResult> Authentication results that are active (may be generated earlier or during current request).private String
A SWF event to signal as the completion of the MFA flow.private AuthenticationFlowDescriptor
Login flow descriptor for the MFA flow.private String
The next flow due to execute (or the currently executing flow during subflow execution).private Map<String,
MultiFactorAuthenticationTransition> Map of login "factors" (flows) and the transition rules to run after them. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a live list of theAuthenticationResult
objects produced during the flow.Get theAuthenticationFlowDescriptor
representing the MFA flow.getEvent()
Get an event that should be signaled as the result of the MFA flow.Get the next flow due to execute (or that is currently executing).Get a live map of the transitions to apply.boolean
Get whether one or more of the active results in this context satisfies the request.Set theAuthenticationFlowDescriptor
representing the MFA flow.Set an event that should be signaled as the result of the MFA flow.setNextFlowId
(String id) Set the next flow due to execute.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 Details
-
transitionMap
Map of login "factors" (flows) and the transition rules to run after them. -
activeResults
Authentication results that are active (may be generated earlier or during current request). -
mfaFlowDescriptor
Login flow descriptor for the MFA flow. -
nextFlowId
The next flow due to execute (or the currently executing flow during subflow execution). -
event
A SWF event to signal as the completion of the MFA flow.
-
-
Constructor Details
-
MultiFactorAuthenticationContext
public MultiFactorAuthenticationContext()Constructor.
-
-
Method Details
-
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
Get a live list of theAuthenticationResult
objects produced during the flow.- Returns:
- list of results
-
getAuthenticationFlowDescriptor
Get theAuthenticationFlowDescriptor
representing the MFA flow.- Returns:
- descriptor
-
setAuthenticationFlowDescriptor
@Nonnull public MultiFactorAuthenticationContext setAuthenticationFlowDescriptor(@Nullable AuthenticationFlowDescriptor descriptor) Set theAuthenticationFlowDescriptor
representing the MFA flow.- Parameters:
descriptor
- login flow descriptor- Returns:
- this context
-
getNextFlowId
Get the next flow due to execute (or that is currently executing).- Returns:
- the ID of the next flow to execute
-
setNextFlowId
Set the next flow due to execute.- Parameters:
id
- flow ID- Returns:
- this context
-
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
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
-