Package net.shibboleth.idp.authn.context
Class AuthenticationWarningContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.authn.context.AuthenticationWarningContext
- All Implemented Interfaces:
Iterable<BaseContext>
A context that holds information about authentication warnings.
The login process is particularly prone to requiring detailed warning information to provide appropriate user feedback and auditing, and this context tracks warnings that occur and preserves detailed information about the kind of warnings encountered in multi-part authentication flows.
- Parent:
AuthenticationContext- Added:
- After a warning is generated during authentication
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<String>Warning conditions detected through classified warning messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClassifiedWarning(String warning) Adds a classified warning to the context, ensuring that it will be returned fromgetLastClassifiedWarning()until another is added.Get a mutable collection of warning "tokens" associated with the context.Gets the last classified warning added, or null if none.booleanisClassifiedWarning(String warning) Check for the presence of a particular warning condition in the context.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
-
classifiedWarnings
Warning conditions detected through classified warning messages.
-
-
Constructor Details
-
AuthenticationWarningContext
public AuthenticationWarningContext()Constructor.
-
-
Method Details
-
getClassifiedWarnings
Get a mutable collection of warning "tokens" associated with the context.- Returns:
- mutable collection of warning strings
-
isClassifiedWarning
Check for the presence of a particular warning condition in the context.- Parameters:
warning- the condition to check for- Returns:
- true if the context contains the warning condition specified
-
addClassifiedWarning
@Nonnull public AuthenticationWarningContext addClassifiedWarning(@Nonnull @NotEmpty String warning) Adds a classified warning to the context, ensuring that it will be returned fromgetLastClassifiedWarning()until another is added.- Parameters:
warning- warning to add- Returns:
- this context
- Since:
- 5.0.0
-
getLastClassifiedWarning
Gets the last classified warning added, or null if none.- Returns:
- last warning added or null
- Since:
- 5.0.0
-