private AuthenticationEntryPoint getAppropriateEntryPoint(HttpServletRequest request) {
    for (String pattern : m_patterns) {
      RequestMatcher matcher = new AntPathRequestMatcher(pattern);
      if (matcher.matches(request)) {
        return m_matchingEntryPoint;
      }
    }

    return m_nonMatchingEntryPoint;
  }