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

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

After a successful connect, one has to authenticate oneself. This method can be used to explicitly use the special "none" authentication method (where only a username has to be specified).

Note 1: The "none" method may always be tried by clients, however as by the specs, the server will not explicitly announce it. In other words, the "none" token will never show up in the list returned by getRemainingAuthMethods(String).

Note 2: no matter which one of the authenticateWithXXX() methods you call, the library will always issue exactly one initial "none" authentication request to retrieve the initially allowed list of authentication methods by the server. Please read RFC 4252 for the details.

If the authentication phase is complete, true will be returned. If further authentication steps are needed, false is returned and one can retry by any other authentication method (use the getRemainingAuthMethods method to get a list of the remaining possible methods).

if the connection is now authenticated.

Definition at line 345 of file Connection.java.

            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);

            if (user == null)
                  throw new IllegalArgumentException("user argument is null");

            /* Trigger the sending of the PacketUserauthRequestNone packet */
            /* (if not already done)                                       */

            authenticated = am.authenticateNone(user);

            return authenticated;

Generated by  Doxygen 1.6.0   Back to index