Beispiel #1
0
 private boolean tryWith(AuthMethod meth) throws UserAuthException, TransportException {
   currentMethod = meth;
   result.clear();
   meth.init(this);
   meth.request();
   return result.get(timeout, TimeUnit.SECONDS);
 }
Beispiel #2
0
 private void gotFailure(SSHPacket buf) throws UserAuthException, TransportException {
   allowed.clear();
   allowed.addAll(Arrays.<String>asList(buf.readString().split(",")));
   partialSuccess |= buf.readBoolean();
   if (allowed.contains(currentMethod.getName()) && currentMethod.shouldRetry())
     currentMethod.request();
   else {
     saveException(currentMethod.getName() + " auth failed");
     result.set(false);
   }
 }