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

# Class ExtractPublicKeyCredentialAssertionFromFormRequest

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<WebAuthnAuthenticationContext>
net.shibboleth.idp.plugin.authn.webauthn.impl.ExtractPublicKeyCredentialAssertionFromFormRequest

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

public class ExtractPublicKeyCredentialAssertionFromFormRequest extends AbstractWebAuthnAction<WebAuthnAuthenticationContext>
An action that extracts the PublicKeyCredential containing the authenticator assertion response from the incoming HTTP request. Also processes the do-not-cache instruction for SSO bypass.

Event:
  `AuthnEventIds.NO_CREDENTIALS`
Precondition:

      ProfileRequestContext.getSubcontext(WebAuthnAuthenticationContext.class) != null

Postcondition:

      WebAuthnAuthenticationContext.getAuthenticatorAssertionResponse() == null

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_PARAMETER_NAME`
Default public key credential assertion parameter name.
`private final org.slf4j.Logger`
`log`
Class logger.
`private com.fasterxml.jackson.databind.ObjectMapper`
`objectMapper`
JSON object mapper.
`private String`
`publicKeyCredentialAssertionParameterName`
Name of public key credential with the assertion response parameter.
`private String`
`ssoBypassFieldName`
Parameter name for SSO bypass.

## Constructor Summary

Constructors
Constructor
Description
`ExtractPublicKeyCredentialAssertionFromFormRequest()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext, WebAuthnAuthenticationContext context)`
Performs this WebAuthn authentication action using the supplied WebAuthn context.
`protected void`
`doInitialize()`
`private void`
`processDoNotCacheInstruction(ProfileRequestContext profileRequestContext, HttpServletRequest request)`
Process the do-not-cache instruction.
`void`
`setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)`
Set the JSON `ObjectMapper`.
`void`
`setPublicKeyCredentialAssertionParameterName(String field)`
Set the name of the public key credential assertion parameter to extract.
`void`
`setSSOBypassFieldName(String fieldName)`
Set the SSO bypass parameter name.

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

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

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

See Also:
  - Constant Field Values

### log

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

### publicKeyCredentialAssertionParameterName

@NonnullAfterInit @NotEmpty private String publicKeyCredentialAssertionParameterName
Name of public key credential with the assertion response parameter.

### ssoBypassFieldName

@Nonnull @NotEmpty private String ssoBypassFieldName
Parameter name for SSO bypass.

### objectMapper

@NonnullAfterInit private com.fasterxml.jackson.databind.ObjectMapper objectMapper
JSON object mapper.

## Constructor Details

### ExtractPublicKeyCredentialAssertionFromFormRequest

public ExtractPublicKeyCredentialAssertionFromFormRequest()
Constructor.

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException
Description copied from class: `AbstractWebAuthnAction`

Overrides:
  `doInitialize` in class `AbstractWebAuthnAction<WebAuthnAuthenticationContext>`
Throws:
  `ComponentInitializationException`

### setObjectMapper

public void setObjectMapper(@Nonnull com.fasterxml.jackson.databind.ObjectMapper mapper)
Set the JSON `ObjectMapper`.

Parameters:
  `mapper` - object mapper

### setSSOBypassFieldName

public void setSSOBypassFieldName(@Nonnull @NotEmpty String fieldName)
Set the SSO bypass parameter name.

Parameters:
  `fieldName` - the SSO bypass parameter name

### setPublicKeyCredentialAssertionParameterName

public void setPublicKeyCredentialAssertionParameterName(@Nonnull @NotEmpty String field)
Set the name of the public key credential assertion parameter to extract.

Parameters:
  `field` - the field name

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull WebAuthnAuthenticationContext 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<WebAuthnAuthenticationContext>`
Parameters:
  `profileRequestContext` - the current IdP profile request context
  `context` - the WebAuthn context

### processDoNotCacheInstruction

private void processDoNotCacheInstruction(@Nonnull ProfileRequestContext profileRequestContext, @Nullable HttpServletRequest request)
Process the do-not-cache instruction.

Parameters:
  `profileRequestContext` - profile request context
  `request` - current HTTP servlet request