public Optional<DelegatedClientIdentityProviderConfiguration> resolve() {
        val name = client.getName();
        val matcher = PAC4J_CLIENT_SUFFIX_PATTERN.matcher(client.getClass().getSimpleName());
        val type = matcher.replaceAll(StringUtils.EMPTY).toLowerCase(Locale.ENGLISH);
        val uriBuilder = UriComponentsBuilder
            .fromUriString(ENDPOINT_URL_REDIRECT)
            .queryParam(Pac4jConstants.DEFAULT_CLIENT_NAME_PARAMETER, name);
        val queryParams = new HashMap<String, String>();

        LOGGER.trace("Request parameters are [{}]", webContext.getRequestParameters());
        if (service != null) {
            val sourceParam = service.getSource();
            val serviceParam = service.getOriginalUrl();
            LOGGER.debug("Processing service parameter [{}] with value [{}]", sourceParam, serviceParam);
            if (StringUtils.isNotBlank(sourceParam) && StringUtils.isNotBlank(serviceParam)) {
                uriBuilder.queryParam(sourceParam, "{service}");
                queryParams.put(CasProtocolConstants.PARAMETER_SERVICE, serviceParam);
            }
        }

        checkForMethodParameter(uriBuilder, queryParams);
        checkForLocalParameter(uriBuilder, queryParams);
        checkForThemeParameter(uriBuilder, queryParams);

        val redirectUrl = uriBuilder.build(queryParams).toString();
        LOGGER.trace("Final redirect url is [{}]", redirectUrl);

        val autoRedirect = (DelegationAutoRedirectTypes) client.getCustomProperties()
            .getOrDefault(ClientCustomPropertyConstants.CLIENT_CUSTOM_PROPERTY_AUTO_REDIRECT_TYPE, DelegationAutoRedirectTypes.NONE);
        val title = (String) client.getCustomProperties()
            .getOrDefault(ClientCustomPropertyConstants.CLIENT_CUSTOM_PROPERTY_DISPLAY_NAME, name);
        val cssClass = (String) client.getCustomProperties()
            .getOrDefault(ClientCustomPropertyConstants.CLIENT_CUSTOM_PROPERTY_CSS_CLASS, StringUtils.EMPTY);
        val providerConfig = DelegatedClientIdentityProviderConfiguration.builder()
            .name(name)
            .autoRedirectType(autoRedirect)
            .redirectUrl(redirectUrl)
            .type(type)
            .title(title)
            .cssClass(cssClass)
            .build();
        return Optional.of(providerConfig);
    }
Build provider configuration.

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