handlePass method

void handlePass(
  1. String argument,
  2. FtpSession session
)

Implementation

void handlePass(String argument, FtpSession session) {
  if ((session.username == null && session.password == null) ||
      (session.cachedUsername == session.username &&
          argument == session.password)) {
    session.isAuthenticated = true;
    session.sendResponse('230 User logged in, proceed');
  } else {
    session.sendResponse('530 Not logged in');
  }
}