@Override
    public Set<? extends MultifactorAuthenticationTrustRecord> get(final String principal, final ZonedDateTime onOrAfterDate) {
        val res = get(principal);
        res.removeIf(entry -> {
            if (entry.getRecordDate().isBefore(onOrAfterDate)) {
                return true;
            }
            val decodedKey = cipherExecutor.decode(entry.getRecordKey());
            val currentKey = keyGenerationStrategy.generate(entry);
            return StringUtils.isBlank(decodedKey) || !decodedKey.equals(currentKey);
        });
        return res;
    }
This is {@link BaseMultifactorAuthenticationTrustStorage}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-trusted-mfa-core/src/main/java/org/apereo/cas/trusted/authentication/storage/BaseMultifactorAuthenticationTrustStorage.java