class CookieContentFilter extends AbstractSecureContentFilter {

    public Optional<AbstractAuthenticationToken> extractContent(HttpServletRequest request) {
        Cookie[] cookies = request.getCookies();
        if (cookies == null) {
            return Optional.empty();
        }

        return Arrays.stream(cookies)
            .filter(cookie -> cookie.getName().equals(authConfigurationProperties.getCookieProperties().getCookieName()))
            .filter(cookie -> !cookie.getValue().isEmpty())
            .findFirst()
            .map(cookie -> new TokenAuthentication(cookie.getValue()));
    }

    public  CookieContentFilter(AuthenticationManager authenticationManager,
                               AuthenticationFailureHandler failureHandler,
                               ResourceAccessExceptionHandler resourceAccessExceptionHandler,
                               AuthConfigurationProperties authConfigurationProperties);
    public  CookieContentFilter(AuthenticationManager authenticationManager,
                               AuthenticationFailureHandler failureHandler,
                               ResourceAccessExceptionHandler resourceAccessExceptionHandler,
                               AuthConfigurationProperties authConfigurationProperties,
                               String[] endpoints);

}