private void configureRemoteUserValve(final TomcatServletWebServerFactory tomcat) {
        val valve = casProperties.getServer().getTomcat().getRemoteUserValve();
        if (StringUtils.isNotBlank(valve.getRemoteUserHeader())) {
            addTomcatValve(tomcat, CasEmbeddedApacheTomcatValveTypes.CONTEXT, new RemoteUserValve());
        }
    }
This is {@link CasTomcatServletWebServerFactoryCustomizer}.

@author Misagh Moayyed
@since 6.1.0
webapp/cas-server-webapp-init-tomcat/src/main/java/org/apereo/cas/tomcat/CasTomcatServletWebServerFactoryCustomizer.java