class AmbariJwtAuthenticationFilter implements AmbariAuthenticationFilter {

  String getJWTFromCookie(HttpServletRequest req) {
    String serializedJWT = null;
    Cookie[] cookies = req.getCookies();
    if (cookies != null) {
      JwtAuthenticationProperties jwtProperties = propertiesProvider.get();
      String jwtCookieName = (jwtProperties == null) ? null : jwtProperties.getCookieName();
      if (StringUtils.isEmpty(jwtCookieName)) {
        jwtCookieName = AmbariServerConfigurationKey.SSO_JWT_COOKIE_NAME.getDefaultValue();
      }

      for (Cookie cookie : cookies) {
        if (jwtCookieName.equals(cookie.getName())) {
          LOG.info("{} cookie has been found and is being processed", jwtCookieName);
          serializedJWT = cookie.getValue();
          break;
        }
      }
    }
    return serializedJWT;
  }

    AmbariJwtAuthenticationFilter(AuthenticationEntryPoint ambariEntryPoint,
                                JwtAuthenticationPropertiesProvider propertiesProvider,
                                AmbariJwtAuthenticationProvider authenticationProvider,
                                AmbariAuthenticationEventHandler eventHandler);

}