Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

synchronized boolean com::trilead::ssh2::Connection::isAuthMethodAvailable ( String  user,
String  method 
) throws IOException [inline]

Checks if a specified authentication method is available. This method is actually just a wrapper for getRemainingAuthMethods().

Parameters:
userA String holding the username.
methodAn authentication method name (e.g., "publickey", "password", "keyboard-interactive") as specified by the SSH-2 standard.
Returns:
if the specified authentication method is currently available.
Exceptions:
IOException

Definition at line 1007 of file Connection.java.

References getRemainingAuthMethods().

      {
            if (method == null)
                  throw new IllegalArgumentException("method argument may not be NULL!");

            String methods[] = getRemainingAuthMethods(user);

            for (int i = 0; i < methods.length; i++)
            {
                  if (methods[i].compareTo(method) == 0)
                        return true;
            }

            return false;
      }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index