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, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,AuthenticationResult> Authentication results that are active (may be generated earlier or during current request).private StringA SWF event to signal as the completion of the MFA flow.private AuthenticationFlowDescriptorLogin flow descriptor for the MFA flow.private StringThe 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 theAuthenticationResultobjects produced during the flow.Get theAuthenticationFlowDescriptorrepresenting 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.booleanGet whether one or more of the active results in this context satisfies the request.booleanGet whether any active result in this context contains the inputPrincipal.Set theAuthenticationFlowDescriptorrepresenting 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, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
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 theAuthenticationResultobjects produced during the flow.- Returns:
- list of results
-
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
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
-
isActive
Get whether any active result in this context contains the inputPrincipal.This is a "crude" means of testing for the existence of a particular
Principalinside an active result. Usually this is used to test for the existence of a particular custom value used to represent a particular login quality or type.- Parameters:
principal- input to check for- Returns:
- true iff an active and presumably usable result contains the input
- Since:
- 5.0.0
-