waitFor(CLOSED | WAIT_AUTH, 0);
if (closeFuture.isClosed()) {
throw new IllegalStateException("Session is closed");
}
authFuture = new DefaultAuthFuture(lock);
userAuth = new UserAuthPublicKey(this, username, key);
setState(ClientSessionImpl.State.UserAuth);
switch (userAuth.next(null)) {
case Success:
authFuture.setAuthed(true);