static JsonWebKey generateJsonWebKey(final OidcProperties oidcProperties,
                                         final OidcJsonWebKeyUsage usage) {
        val properties = oidcProperties.getJwks().getCore();
        val jsonWebKey = OidcJsonWebKeyStoreUtils.generateJsonWebKey(properties.getJwksType(),
            properties.getJwksKeySize(), usage);
        jsonWebKey.setKeyId(properties.getJwksKeyId().concat("-").concat(RandomUtils.randomAlphabetic(8)));
        return jsonWebKey;
    }
Generate json web key json web key.

@param oidcProperties the oidc properties
@param usage          the usage
@return the json web key
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/generator/OidcJsonWebKeystoreGeneratorService.java