public static JsonWebKeyLifecycleStates getJsonWebKeyState(final JsonWebKey key) {
            val state = key.getOtherParameterValue(OidcJsonWebKeystoreRotationService.PARAMETER_STATE, Long.class);
            return Arrays.stream(JsonWebKeyLifecycleStates.values())
                .filter(s -> state != null && s.getState() == state)
                .findFirst()
                .orElse(CURRENT);
        }
Gets json web key state.

@param key the key
@return the json web key state
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/rotation/OidcJsonWebKeystoreRotationService.java