if (mechanisms.contains("SCRAM-SHA-1")) {
saslClient = new ScramSHA1Client(credentials);
}
else if (mechanisms.contains("PLAIN")) {
saslClient = new PlainClient(credentials);
}
else {
setStatus(SessionStatus.notAuthorized);
mode = SessionMode.offline;
connection.disconnect();