@Override
    public JsonWebKeySet revoke() {
        return whenKeystoreResourceExists()
            .map(Unchecked.function(resource -> {
                LOGGER.trace("Revoking previous keys found in [{}]", resource);
                val jsonWebKeySet = OidcJsonWebKeystoreGeneratorService.toJsonWebKeyStore(resource);
                jsonWebKeySet.getJsonWebKeys().removeIf(key -> {
                    LOGGER.debug("Processing key [{}] to determine revocation eligibility", key.getKeyId());
                    val state = JsonWebKeyLifecycleStates.getJsonWebKeyState(key);
                    return state == JsonWebKeyLifecycleStates.PREVIOUS;
                });
                return generatorService.store(jsonWebKeySet);
            }))
            .orElse(null);
    }
This is {@link OidcDefaultJsonWebKeystoreRotationService}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/rotation/OidcDefaultJsonWebKeystoreRotationService.java