@Test
    void verifySuccessAuthForToken() throws Throwable {
        val context = MockRequestContext.create(applicationContext);

        val userHandle = ByteArray.fromBase64Url(SAMPLE_TOKEN);
        val token = webAuthnSessionManager.createSession(userHandle);
        context.setParameter("token", token.getBase64Url());

        webAuthnCredentialRepository.addRegistrationByUsername("casuser",
            CredentialRegistration.builder()
                .credential(RegisteredCredential.builder()
                    .credentialId(ByteArray.fromBase64Url("casuser"))
                    .userHandle(userHandle)
                    .publicKeyCose(ByteArray.fromBase64Url(RandomUtils.randomAlphabetic(8)))
                    .build())
                .userIdentity(UserIdentity.builder()
                    .name("casuser")
                    .displayName("CAS")
                    .id(userHandle)
                    .build())
                .build());
        MultifactorAuthenticationWebflowUtils.putMultifactorAuthenticationProvider(context, webAuthnMultifactorAuthenticationProvider);

        val result = webAuthnValidateSessionCredentialTokenAction.execute(context);
        assertEquals(CasWebflowConstants.TRANSITION_ID_FINALIZE, result.getId());
        assertNotNull(WebUtils.getAuthentication(context));
    }
This is {@link WebAuthnValidateSessionCredentialTokenActionTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-webauthn/src/test/java/org/apereo/cas/webauthn/web/flow/WebAuthnValidateSessionCredentialTokenActionTests.java