private static Resource buildResource(final OidcConfiguration configuration) {
        if (configuration != null && configuration.getDiscoveryURI() != null) {
            var resource = SpringResourceHelper.buildResourceFromPath(configuration.getDiscoveryURI());
            if (resource instanceof final UrlResource urlResource) {
                return new OidcMetadataUrlResource(urlResource.getURL(), configuration);
            } else {
                return resource;
            }
        }
        return null;
    }
<p>Constructor for OidcOpMetadataResolver.</p>

@param configuration a {@link OidcConfiguration} object
pac4j-oidc/src/main/java/org/pac4j/oidc/metadata/OidcOpMetadataResolver.java