Class WebAuthnRegistrationInformationContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.authn.webauthn.context.WebAuthnRegistrationInformationContext
All Implemented Interfaces:
Iterable<BaseContext>

public class WebAuthnRegistrationInformationContext extends BaseContext
A WebAuthn version of AuthenticationWarningContext that holds information about WebAuthn registration events. For example, if a new credential has been added or an old credential has been removed.
  • Field Details

    • classifiedMessages

      @Nonnull private final Collection<String> classifiedMessages
      Event conditions detected through classified messages.
  • Constructor Details

    • WebAuthnRegistrationInformationContext

      public WebAuthnRegistrationInformationContext()
      Constructor.
  • Method Details

    • getClassifiedMessages

      @Nonnull @Live public Collection<String> getClassifiedMessages()
      Get a mutable collection of message "tokens" associated with the context.
      Returns:
      mutable collection of message strings
    • isClassifiedMessage

      public boolean isClassifiedMessage(@Nonnull @NotEmpty String msg)
      Check for the presence of a particular message condition in the context.
      Parameters:
      msg - the condition to check for
      Returns:
      true iff the context contains the msg condition specified
    • addClassifiedMessage

      @Nonnull public WebAuthnRegistrationInformationContext addClassifiedMessage(@Nonnull @NotEmpty String msg)
      Adds a classified message to the context, ensuring that it will be returned from getClassifiedMessages() until another is added.
      Parameters:
      msg - message to add
      Returns:
      this context
    • getLastClassifiedMessage

      @Nullable public String getLastClassifiedMessage()
      Gets the last classified message added, or null if none.
      Returns:
      last message added or null
    • reset

      public void reset()
      Reset the information context by clearing the classified messages.