Package net.shibboleth.idp.plugin.authn.webauthn.admin.impl

# Class ExtractNicknameFromFormRequest

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.authn.webauthn.impl.AbstractWebAuthnAction<WebAuthnRegistrationContext>
net.shibboleth.idp.plugin.authn.webauthn.admin.impl.ExtractNicknameFromFormRequest

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

public class ExtractNicknameFromFormRequest extends AbstractWebAuthnAction<WebAuthnRegistrationContext>
An action that extracts the key nickname from the incoming HTTP request. If a nickname is required and not provided a non-proceed event is signalled.

Event:
  {WebAuthnRegistrationEventIds#INVALID_REGISTRATION}, {WebAuthnRegistrationEventIds#INVALID_ADMIN_ACTION}, {AuthnEventIds#NO_CREDENTIALS}
Precondition:

      ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null

Postcondition:
  add a credential nickname (if present) to the registration context

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`credentialNicknameParameterName`
Name of the nickname parameter.
`static final String`
`DEFAULT_NICKNAME_FIELD_NAME`
Default nickname parameter name.
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`noCredentialNicknameEventId`
The EventID of the event to build if no credential nickname can be found in the request and a nickname is required.

## Constructor Summary

Constructors
Constructor
Description
`ExtractNicknameFromFormRequest()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext, WebAuthnRegistrationContext context)`
Performs this WebAuthn authentication action using the supplied WebAuthn context.
`void`
`setCredentialNicknameParameterName(String field)`
Set the name of the parameter to extract the credential nickname from.
`void`
`setNoCredentialNicknameEventId(String eventId)`
Set the EventID of the event to build if no credential nickname can be found in the request and a nickname is required.

### Methods inherited from class net.shibboleth.idp.plugin.authn.webauthn.impl.AbstractWebAuthnAction

`doExecute, doInitialize, doPreExecute, doPreExecute, enhancedCredentialRecord, getAaguidMetadata, getAaguidService, getAuthenticatorMetadata, getCredentialRepository, getFidoMetadataService, getWebAuthnClient, setAaguidService, setCredentialRepository, setFidoMetadataService, setWebAuthnClient, setWebAuthnContextLookupStrategy`

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### DEFAULT_NICKNAME_FIELD_NAME

@Nonnull @NotEmpty public static final String DEFAULT_NICKNAME_FIELD_NAME
Default nickname parameter name.

See Also:
  - Constant Field Values

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### credentialNicknameParameterName

@Nonnull @NotEmpty private String credentialNicknameParameterName
Name of the nickname parameter.

### noCredentialNicknameEventId

@Nonnull @NotEmpty private String noCredentialNicknameEventId
The EventID of the event to build if no credential nickname can be found in the request and a nickname is required.

## Constructor Details

### ExtractNicknameFromFormRequest

public ExtractNicknameFromFormRequest()
Constructor.

## Method Details

### setCredentialNicknameParameterName

public void setCredentialNicknameParameterName(@Nonnull @NotEmpty String field)
Set the name of the parameter to extract the credential nickname from.

Parameters:
  `field` - field name

### setNoCredentialNicknameEventId

public void setNoCredentialNicknameEventId(@Nonnull @NotEmpty String eventId)
Set the EventID of the event to build if no credential nickname can be found in the request and a nickname is required.

Parameters:
  `eventId` - the eventId to build.

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull WebAuthnRegistrationContext context)
Description copied from class: `AbstractWebAuthnAction`
Performs this WebAuthn authentication action using the supplied WebAuthn context. Implementations should override this method.

Overrides:
  `doExecute` in class `AbstractWebAuthnAction<WebAuthnRegistrationContext>`
Parameters:
  `profileRequestContext` - the current IdP profile request context
  `context` - the WebAuthn context