src/main/java/org/realityforge/ssf/HttpUtil.java
/**
   * Return true if username/password can successfully login to the container security.
   * This is implemented by attempting to authenticate via request, then logging out if
   * login was successful.
   *
   * @param request the incoming request.
   * @param username the username to check.
   * @param password the password credential.
   * @return true if able to authenticate, false otherwise.
   */
Return true if username/password can successfully login to the container security.
This is implemented by attempting to authenticate via request, then logging out if
login was successful.

@param request the incoming request.
@param username the username to check.
@param password the password credential.
@return true if able to authenticate, false otherwise.
Return true if username / password can successfully login to the container security . This is implemented by attempting to authenticate via request then logging out if login was successful . @param request the incoming request . @param username the username to check . @param password the password credential . @return true if able to authenticate false otherwise .
public static boolean authenticate( @Nonnull final HttpServletRequest request,
                                      @Nonnull final String username,
                                      @Nonnull final String password )
  {
    try
    {
      request.login( username, password );
      try
      {
        request.logout();
      }
      catch ( final ServletException se1 )
      {
      }
      return true;
    }
    catch ( final ServletException se )
    {
      return false;
    }
  }
public static boolean authenticate ( @ Nonnull final HttpServletRequest request , @ Nonnull final String username , @ Nonnull final String password ) { try { request . login ( username , password ) ; try { request . logout ( ) ; } catch ( final ServletException se1 ) { } return true ; } catch ( final ServletException se ) { return false ; } }
Return true if username/password can successfully login to the container security.
Return true if username / password can successfully login to the container security .
//Ignore. Should never happen in theory