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

# Class UpdateAdminContextWithC14nPrincipal

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<WebAuthnManagementContext>
net.shibboleth.idp.plugin.authn.webauthn.admin.impl.UpdateAdminContextWithC14nPrincipal

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

public class UpdateAdminContextWithC14nPrincipal extends AbstractWebAuthnAction<WebAuthnManagementContext>
A WebAuthn management action that sets the principal name from the SubjectCanonicalizationContext back onto the WebAuthn context as the search username. It then removes the SubjectCanonicalizationContext from the parent, this can help avoid conflicting/confusing situations where a new c14n context will be created by subsequent authentication steps.

Event:
  `EventIds.PROCEED_EVENT_ID`
Precondition:

      ProfileRequestContext.getSubcontext(WebAuthnManagementContext.class) != null

Postcondition:

      ProfileRequestContext.getSubcontext(WebAuthnManagementContext.class).getSearchUsername() != null

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SubjectCanonicalizationContext>`
`scCtxLookupStrategy`
Strategy used to find the `SubjectCanonicalizationContext` from the `ProfileRequestContext`.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`UpdateAdminContextWithC14nPrincipal()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext, WebAuthnManagementContext context)`
Performs this WebAuthn authentication action using the supplied WebAuthn context.
`void`
`setLookupStrategy(Function<ProfileRequestContext,SubjectCanonicalizationContext> strategy)`
Set the context lookup strategy.

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

### log

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

### scCtxLookupStrategy

@Nonnull private Function<ProfileRequestContext,SubjectCanonicalizationContext> scCtxLookupStrategy
Strategy used to find the `SubjectCanonicalizationContext` from the `ProfileRequestContext`.

## Constructor Details

### UpdateAdminContextWithC14nPrincipal

protected UpdateAdminContextWithC14nPrincipal()
Constructor.

## Method Details

### setLookupStrategy

public void setLookupStrategy(@Nonnull Function<ProfileRequestContext,SubjectCanonicalizationContext> strategy)
Set the context lookup strategy.

Parameters:
  `strategy` - lookup strategy function for `SubjectCanonicalizationContext`.

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull WebAuthnManagementContext context)
Performs this WebAuthn authentication action using the supplied WebAuthn context. Implementations should override this method.

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