@Bean
    @Lazy(false)
    public InitializingBean wsSecurityTokenServiceInitializingBean(
        @Qualifier(OpenSamlConfigBean.DEFAULT_BEAN_NAME)
        final OpenSamlConfigBean openSamlConfigBean) {
        return () -> {
            val warningMessage = "The security token service configuration of CAS will try to disable the OpenSAML bootstrapping process by wss4j, "
                                 + "as it interferes with and prevents CAS' own initialization of OpenSAML. Given the current API limitations of the wss4j library, "
                                 + "which is responsible for the implementation of the security token service in CAS, "
                                 + "Java reflection is used to disable the OpenSAML bootstrapping process. This approach is prone to error, "
                                 + "and may be revisited in future versions of CAS, "
                                 + "once the wss4j library opens up its OpenSAML bootstrapping API in more extensible ways";
            LOGGER.info(warningMessage);

            LOGGER.trace("Initializing WS provider configuration...");
            WSProviderConfig.init();

            LOGGER.trace("Marking OpenSAML components as initialized...");
            findFieldAndSetValue("providerRegistry", openSamlConfigBean.getXmlObjectProviderRegistry());
            findFieldAndSetValue("builderFactory", openSamlConfigBean.getBuilderFactory());
            findFieldAndSetValue("marshallerFactory", openSamlConfigBean.getMarshallerFactory());
            findFieldAndSetValue("unmarshallerFactory", openSamlConfigBean.getUnmarshallerFactory());
            findFieldAndSetValue("samlEngineInitialized", Boolean.TRUE);
        };
    }
This is {@link CoreWsSecuritySecurityTokenServiceSamlConfiguration}.

@author Misagh Moayyed
@author Paul Spaude
@since 5.3.6
support/cas-server-support-ws-sts/src/main/java/org/apereo/cas/config/CoreWsSecuritySecurityTokenServiceSamlConfiguration.java