Package net.shibboleth.idp.plugin.authn.webauthn.context

# 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.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext

`BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Collection<String>`
`classifiedMessages`
Event conditions detected through classified messages.

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnRegistrationInformationContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`WebAuthnRegistrationInformationContext`
`addClassifiedMessage(String msg)`
Adds a classified message to the context, ensuring that it will be returned from `getClassifiedMessages()` until another is added.
`Collection<String>`
`getClassifiedMessages()`
Get a mutable collection of message "tokens" associated with the context.
`String`
`getLastClassifiedMessage()`
Gets the last classified message added, or null if none.
`boolean`
`isClassifiedMessage(String msg)`
Check for the presence of a particular message condition in the context.
`void`
`reset()`
Reset the information 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, setParent`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## 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.