All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class AddUserId extends AbstractWebAuthnAction<WebAuthnRegistrationContext>
An action to generate or lookup a user.id (stored by an authenticator as the userHandle). This is used by the IdP to map a public key credential to a users session map of public keys, and by the authenticator to map the IdP's ID (RelyingParty ID) and the userHandle to a public key credential source (which contains the private key).

Used during the registration process, added to PublicKeyCredentialCreationOptions.

The user.id could contain some form of state if required, but must not contain retrievable PII.

The same user should have the same user.id. That is, a single user can have more than one registered credential.

Event:
WebAuthnRegistrationEventIds.INVALID_REGISTRATION
Precondition:
ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null
Postcondition:
a user ID is added to the registration context