public final class AuthenticationContext
extends org.opensaml.messaging.context.BaseContext
| Modifier and Type | Field and Description |
|---|---|
private Map<String,AuthenticationResult> |
activeResults
Authentication results associated with an active session and available for (re)use.
|
private AuthenticationFlowDescriptor |
attemptedFlow
Authentication flow being attempted to authenticate the user.
|
private AuthenticationResult |
authenticationResult
A successfully processed authentication result (the output of the attempted flow, if any).
|
private long |
completionInstant
Time, in milliseconds since the epoch, when authentication process completed.
|
private PrincipalEvalPredicateFactoryRegistry |
evalRegistry
The registry of predicate factories for custom principal evaluation.
|
private boolean |
forceAuthn
Whether to require fresh subject interaction to succeed.
|
private String |
hintedName
A non-normative hint some protocols support to indicate who the subject might be.
|
private long |
initiationInstant
Time, in milliseconds since the epoch, when the authentication process started.
|
private Map<String,AuthenticationFlowDescriptor> |
intermediateFlows
Previously attempted flows (could be failures or intermediate results).
|
private boolean |
isPassive
Whether authentication must not involve subject interaction.
|
private Map<String,AuthenticationFlowDescriptor> |
potentialFlows
Flows that could potentially be used to authenticate the user.
|
private boolean |
resultCacheable
Result may be cached for reuse in the normal way.
|
private String |
signaledFlowId
Signals authentication flow to run next, to influence selection logic.
|
| Constructor and Description |
|---|
AuthenticationContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,AuthenticationResult> |
getActiveResults()
Get the authentication results currently active for the subject.
|
AuthenticationFlowDescriptor |
getAttemptedFlow()
Get the authentication flow that was attempted in order to authenticate the user.
|
AuthenticationResult |
getAuthenticationResult()
Get the authentication result produced by the attempted flow, or reused for SSO.
|
long |
getCompletionInstant()
Get the time, in milliseconds since the epoch, when the authentication process ended.
|
String |
getHintedName()
Get a non-normative hint provided by the request about the user's identity.
|
long |
getInitiationInstant()
Get the time, in milliseconds since the epoch, when the authentication process started.
|
Map<String,AuthenticationFlowDescriptor> |
getIntermediateFlows()
Get the set of flows that have been executed, successfully or otherwise, without producing a completed result.
|
Map<String,AuthenticationFlowDescriptor> |
getPotentialFlows()
Get the set of flows that could potentially be used for user authentication.
|
PrincipalEvalPredicateFactoryRegistry |
getPrincipalEvalPredicateFactoryRegistry()
Get the registry of predicate factories for custom principal evaluation.
|
String |
getSignaledFlowId()
Get the flow ID signaled as the next selection.
|
boolean |
isForceAuthn()
Get whether to require fresh subject interaction to succeed.
|
boolean |
isPassive()
Get whether subject interaction is allowed.
|
boolean |
isResultCacheable()
Get whether the result is suitable for caching (such as in a session) for reuse.
|
AuthenticationContext |
setActiveResults(Iterable<AuthenticationResult> results)
Set the authentication results currently active for the subject.
|
AuthenticationContext |
setAttemptedFlow(AuthenticationFlowDescriptor flow)
Set the authentication flow that was attempted in order to authenticate the user.
|
AuthenticationContext |
setAuthenticationResult(AuthenticationResult result)
Set the authentication result produced by the attempted flow, or reused for SSO.
|
AuthenticationContext |
setCompletionInstant()
Set the completion time of the authentication attempt to the current time.
|
AuthenticationContext |
setForceAuthn(boolean force)
Set whether to require fresh subject interaction to succeed.
|
AuthenticationContext |
setHintedName(String hint)
Set a non-normative hint provided by the request about the user's identity.
|
AuthenticationContext |
setIsPassive(boolean passive)
Set whether subject interaction is allowed.
|
void |
setPrincipalEvalPredicateFactoryRegistry(PrincipalEvalPredicateFactoryRegistry registry)
Set the registry of predicate factories for custom principal evaluation.
|
void |
setResultCacheable(boolean flag)
Set whether the result is suitable for caching (such as in a session) for reuse.
|
AuthenticationContext |
setSignaledFlowId(String id)
Set the flow ID signaled as the next selection.
|
String |
toString() |
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, isAutoCreateSubcontexts, iterator, removeSubcontext, removeSubcontext, setAutoCreateSubcontexts, setParent@Positive private final long initiationInstant
private boolean forceAuthn
private boolean isPassive
@Nullable private String hintedName
@Nonnull @NonnullElements private final Map<String,AuthenticationFlowDescriptor> potentialFlows
@Nonnull @NonnullElements private final Map<String,AuthenticationResult> activeResults
@Nonnull private PrincipalEvalPredicateFactoryRegistry evalRegistry
@Nonnull @NonnullElements private final Map<String,AuthenticationFlowDescriptor> intermediateFlows
@Nullable private AuthenticationFlowDescriptor attemptedFlow
@Nullable private String signaledFlowId
@Nullable private AuthenticationResult authenticationResult
private boolean resultCacheable
@NonNegative private long completionInstant
@Positive public long getInitiationInstant()
@Nonnull @NonnullElements @Unmodifiable public Map<String,AuthenticationResult> getActiveResults()
@Nonnull public AuthenticationContext setActiveResults(@Nonnull@NonnullElements Iterable<AuthenticationResult> results)
results - authentication results currently active for the subject@Nonnull @NonnullElements @Live public Map<String,AuthenticationFlowDescriptor> getPotentialFlows()
@Nonnull @NonnullElements @Live public Map<String,AuthenticationFlowDescriptor> getIntermediateFlows()
@Nonnull public PrincipalEvalPredicateFactoryRegistry getPrincipalEvalPredicateFactoryRegistry()
public void setPrincipalEvalPredicateFactoryRegistry(@Nonnull PrincipalEvalPredicateFactoryRegistry registry)
registry - predicate factory registrypublic boolean isPassive()
@Nonnull public AuthenticationContext setIsPassive(boolean passive)
passive - whether subject interaction may occurpublic boolean isForceAuthn()
@Nonnull public AuthenticationContext setForceAuthn(boolean force)
force - whether subject interaction must occur@Nullable public String getHintedName()
@Nonnull public AuthenticationContext setHintedName(@Nullable String hint)
hint - the username hint@Nullable public AuthenticationFlowDescriptor getAttemptedFlow()
This is not set if an existing result was reused for SSO.
@Nonnull public AuthenticationContext setAttemptedFlow(@Nullable AuthenticationFlowDescriptor flow)
Do not set if an existing result was reused for SSO.
flow - authentication flow that was attempted in order to authenticate the user@Nullable public String getSignaledFlowId()
@Nonnull public AuthenticationContext setSignaledFlowId(@Nullable String id)
id - ID of flow to run next@Nullable public AuthenticationResult getAuthenticationResult()
@Nonnull public AuthenticationContext setAuthenticationResult(@Nullable AuthenticationResult result)
result - authentication result, if anypublic boolean isResultCacheable()
public void setResultCacheable(boolean flag)
flag - flag to set@NonNegative public long getCompletionInstant()
@Nonnull public AuthenticationContext setCompletionInstant()
Copyright © 1999–2015. All rights reserved.