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

# Class ExtractKeyInformationFromFormRequest

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.admin.impl.ExtractKeyInformationFromFormRequest

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

public class ExtractKeyInformationFromFormRequest extends AbstractProfileAction
An action that extracts the credential ID for from the incoming HTTP request and uses a `BiConsumer` to set it back onto an appropriate context.

Event:
  {WebAuthnRegistrationEventIds#INVALID_ADMIN_ACTION}, {EventIds#INVALID_PROFILE_CTX}
Postcondition:
  add credential ID to remove to the context

## Field Summary

Fields
Modifier and Type
Field
Description
`private BiConsumer<ProfileRequestContext,byte[]>`
`contextSettingConsumer`
A consumer for setting the credential ID back to the context.
`private String`
`credentialIdParameterName`
Name of credential Id parameter.
`static final String`
`DEFAULT_PARAMETER_NAME`
Default credential Id parameter name.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`ExtractKeyInformationFromFormRequest()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected void`
`doInitialize()`
`void`
`setCedentialIdParameterName(String field)`
Set the name of the credential Id parameter.
`void`
`setContextSettingConsumer(BiConsumer<ProfileRequestContext,byte[]> consumer)`
Set the context setting consumer action.

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

`doPreExecute, 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_PARAMETER_NAME

@Nonnull @NotEmpty public static final String DEFAULT_PARAMETER_NAME
Default credential Id parameter name.

See Also:
  - Constant Field Values

### log

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

### credentialIdParameterName

@Nonnull @NotEmpty private String credentialIdParameterName
Name of credential Id parameter.

### contextSettingConsumer

@NonnullAfterInit private BiConsumer<ProfileRequestContext,byte[]> contextSettingConsumer
A consumer for setting the credential ID back to the context.

## Constructor Details

### ExtractKeyInformationFromFormRequest

public ExtractKeyInformationFromFormRequest()
Constructor.

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### setContextSettingConsumer

public void setContextSettingConsumer(BiConsumer<ProfileRequestContext,byte[]> consumer)
Set the context setting consumer action.

Parameters:
  `consumer` - The contextSettingConsumer to set.

### setCedentialIdParameterName

public void setCedentialIdParameterName(@Nonnull @NotEmpty String field)
Set the name of the credential Id parameter.

Parameters:
  `field` - field name

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`