Class WebAuthnRegistrationErrorContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnRegistrationErrorContext
- All Implemented Interfaces:
Iterable<BaseContext>
A WebAuthn version of
AuthenticationErrorContext that holds information about WebAuthn registration events.
For example, if a new credential registration is invalid.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<String>Error conditions detected through classified error messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClassifiedError(String error) Adds a classified error to the context, ensuring that it will be returned fromgetLastClassifiedError()until another is added.Get a mutable collection of error "tokens" associated with the context.Gets the last classified error added, or null if none.booleanisClassifiedError(String error) Check for the presence of a particular error condition in the context.voidreset()Reset the error context by clearing the classified messages.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
-
classifiedErrors
Error conditions detected through classified error messages.
-
-
Constructor Details
-
WebAuthnRegistrationErrorContext
public WebAuthnRegistrationErrorContext()Constructor.
-
-
Method Details
-
getClassifiedErrors
Get a mutable collection of error "tokens" associated with the context.- Returns:
- mutable collection of error strings
-
isClassifiedError
Check for the presence of a particular error condition in the context.- Parameters:
error- the condition to check for- Returns:
- true iff the context contains the error condition specified
-
addClassifiedError
@Nonnull public WebAuthnRegistrationErrorContext addClassifiedError(@Nonnull @NotEmpty String error) Adds a classified error to the context, ensuring that it will be returned fromgetLastClassifiedError()until another is added.- Parameters:
error- error to add- Returns:
- this context
-
getLastClassifiedError
Gets the last classified error added, or null if none.- Returns:
- last error added or null
-
reset
public void reset()Reset the error context by clearing the classified messages.
-