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

synchronized String [] com::trilead::ssh2::Connection::getRemainingAuthMethods ( String  user ) throws IOException [inline]

After a successful connect, one has to authenticate oneself. This method can be used to tell which authentication methods are supported by the server at a certain stage of the authentication process (for the given username).

Note 1: the username will only be used if no authentication step was done so far (it will be used to ask the server for a list of possible authentication methods by sending the initial "none" request). Otherwise, this method ignores the user name and returns a cached method list (which is based on the information contained in the last negative server response).

Note 2: the server may return method names that are not supported by this implementation.

After a successful authentication, this method must not be called anymore.

Parameters:
userA String holding the username.
Returns:
a (possibly emtpy) array holding authentication method names.
Exceptions:
IOException

Definition at line 942 of file Connection.java.

Referenced by isAuthMethodAvailable().

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

            if (tm == null)
                  throw new IllegalStateException("Connection is not established!");

            if (authenticated)
                  throw new IllegalStateException("Connection is already authenticated!");

            if (am == null)
                  am = new AuthenticationManager(tm);

            if (cm == null)
                  cm = new ChannelManager(tm);

            return am.getRemainingMethods(user);
      }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index