@Override
    public void store(final CasSimpleMultifactorAuthenticationTicket token) {
        token.update();
        val trackingToken = ticketRegistry.getTicket(token.getId());
        FunctionUtils.doUnchecked(us -> {
            if (trackingToken != null) {
                LOGGER.debug("Updating existing token [{}] to registry", token.getId());
                ticketRegistry.updateTicket(trackingToken);
            } else {
                LOGGER.debug("Adding token [{}] to registry", token.getId());
                ticketRegistry.addTicket(token);
            }
        });
    }
This is {@link DefaultCasSimpleMultifactorAuthenticationService}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-simple-mfa-core/src/main/java/org/apereo/cas/mfa/simple/validation/DefaultCasSimpleMultifactorAuthenticationService.java