public static Optional<JsonWebKeySet> getJsonWebKeySet(final OidcRegisteredService oidcRegisteredService,
                                                           final ResourceLoader resourceLoader,
                                                           final Optional<OidcJsonWebKeyUsage> usage) {
        return FunctionUtils.doAndHandle(
                () -> {
                    val serviceJwks = SpringExpressionLanguageValueResolver.getInstance().resolve(oidcRegisteredService.getJwks());
                    LOGGER.trace("Loading JSON web key from [{}]", serviceJwks);
                    val resource = getJsonWebKeySetResource(oidcRegisteredService, resourceLoader);
                    if (resource == null) {
                        LOGGER.debug("No JSON web keys or keystore resource could be found for [{}]", oidcRegisteredService.getServiceId());
                        return Optional.empty();
                    }
                    val requestedKid = Optional.ofNullable(oidcRegisteredService.getJwksKeyId());
                    return buildJsonWebKeySet(resource, requestedKid, usage);
                },
                (CheckedFunction<Throwable, Optional<JsonWebKeySet>>) throwable -> {
                    LoggingUtils.error(LOGGER, throwable);
                    return Optional.empty();
                })
            .get();
    }
Gets json web key set.

@param oidcRegisteredService        the service
@param resourceLoader the resource loader
@param usage          the usage
@return the json web key set
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/jwks/OidcJsonWebKeyStoreUtils.java