String username = askStringInput(clientHandler, null); //USER <USERNAME>
//no need to check for null : done by QuickAuthenticator
if(username.equalsIgnoreCase("QUIT")) {
sendString(clientHandler, "221 Logged out.");
throw new AppException("Quit");
}
if( username.toUpperCase().startsWith("USER ") == false){
sendString(clientHandler, "503 Bad sequence of command, USER required.");
return false;
} else {
sendString(clientHandler, "331 User name okay, need password.");
}
String password = askStringInput(clientHandler, null);//PASS <PASSWORD>
//no need to check for null : done by QuickAuthenticator
if(password.equalsIgnoreCase("QUIT")) {
sendString(clientHandler, "221 Logged out.");
throw new AppException("Quit");
}
if( password.toUpperCase().startsWith("PASS ") == false ){
sendString(clientHandler, "503 Bad sequence of command, PASS required.");
return false;
}