@Operation(summary = "Remove device registration for username and credential id",
        parameters = {@Parameter(name = "username", required = true, description = "The username to lookup"),
            @Parameter(name = "credentialId", required = true, description = "The credential id")})
    @DeleteMapping(path = "{username}/{credentialId}", produces = MediaType.APPLICATION_JSON_VALUE)
    public void delete(@PathVariable final String username, @PathVariable final String credentialId) throws Exception {
        val ba = ByteArray.fromBase64Url(credentialId);
        registrationStorage.getObject().getRegistrationByUsernameAndCredentialId(username, ba)
            .ifPresent(registration -> registrationStorage.getObject().removeRegistrationByUsername(username, registration));
    }
Delete.

@param username     the username
@param credentialId the credential id
@throws Exception the exception
support/cas-server-support-webauthn-core/src/main/java/org/apereo/cas/webauthn/web/WebAuthnRegisteredDevicesEndpoint.java