String method = buffer.getString();
log.debug("Authenticating user '{}' with method '{}'", username, method);
NamedFactory<UserAuth> factory = NamedFactory.Utils.get(userAuthFactories, method);
if (factory != null) {
UserAuth auth = factory.create();
try {
authed = auth.auth(this, username, buffer);
if (authed == null) {
// authentication is still ongoing
log.debug("Authentication not finished");
if (auth instanceof HandshakingUserAuth) {