code: public GitkitUser validateTokenInRequest(HttpServletRequest request)
        throws GitkitClientException {
      Cookie[] cookies = request.getCookies();
      if (cookieName == null || cookies == null) {
        return null;
      }
  
      for (Cookie cookie : cookies) {
        if (cookieName.equals(cookie.getName())) {
          return validateToken(cookie.getValue());
        }
      }
      return null;
    }
docs: Verifies Gitkit token in http request.
  
  @param request http request
  @return Gitkit user if valid token is found in the request.
  @throws GitkitClientException if there is token but signature is invalid