@Override
    public void doFilter(final ServletRequest request, final ServletResponse response,
                         final FilterChain filterChain) throws IOException, ServletException {
        try {
            if (request instanceof final HttpServletRequest httpServletRequest) {
                val tenantId = tenantExtractor.extract(httpServletRequest).map(TenantDefinition::getId).orElse(null);
                val clientInfo = ClientInfo.from(httpServletRequest, options).setTenant(tenantId);
                ClientInfoHolder.setClientInfo(clientInfo);
            }
            filterChain.doFilter(request, response);
        } finally {
            ClientInfoHolder.clear();
        }
    }
Creates a {@link ClientInfo} object from the http request
and passes it to the {@link ClientInfoHolder} .

@author Scott Battaglia
@since 1.0
core/cas-server-core-audit-api/src/main/java/org/apereo/inspektr/common/web/ClientInfoThreadLocalFilter.java