protected void checkForThemeParameter(final UriComponentsBuilder uriBuilder, final Map<String, String> queryParams) {
        webContext.getRequestParameter(casProperties.getTheme().getParamName()).ifPresent(themeParam -> {
            LOGGER.trace("Processing theme parameter [{}] with value [{}]",
                casProperties.getTheme().getParamName(), themeParam);
            uriBuilder.queryParam(casProperties.getTheme().getParamName(), "{theme}");
            queryParams.put("theme", themeParam);
        });
    }
Build provider configuration.

@return the optional provider
support/cas-server-support-pac4j-core/src/main/java/org/apereo/cas/web/DelegatedClientIdentityProviderConfigurationFactory.java