You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2014/10/16 23:19:11 UTC

[3/8] git commit: Add some javadoc for the deprecated authentication methods on ClientSession and SshClient

Add some javadoc for the deprecated authentication methods on ClientSession and SshClient

Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/9f24b181
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/9f24b181
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/9f24b181

Branch: refs/heads/master
Commit: 9f24b18180b307c46b76936aaf92d0225a1edda8
Parents: 1860e1d
Author: Guillaume Nodet <gn...@apache.org>
Authored: Thu Oct 16 11:21:30 2014 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Thu Oct 16 11:22:21 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/sshd/ClientSession.java     | 23 ++++++++++++++++++++
 .../main/java/org/apache/sshd/SshClient.java    |  3 +++
 2 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/9f24b181/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/ClientSession.java b/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
index fa8296f..e9f0ed8 100644
--- a/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/ClientSession.java
@@ -69,28 +69,51 @@ public interface ClientSession extends Session {
     UserInteraction getUserInteraction();
     void setUserInteraction(UserInteraction userInteraction);
 
+    /**
+     * Starts the authentication process.
+     * User identities will be tried until the server successfully authenticate the user.
+     * User identities must be provided before calling this method using
+     * {@link #addPasswordIdentity(String)} or {@link #addPublicKeyIdentity(java.security.KeyPair)}.
+     *
+     * @return the authentication future
+     * @throws IOException
+     * @see {@link #addPasswordIdentity(String)}
+     * @see {@link #addPublicKeyIdentity(java.security.KeyPair)}
+     */
     AuthFuture auth() throws IOException;
 
     /**
      * Authenticate the session with the given username using an ssh agent.
+     *
+     * @deprecated Use {@link #auth()} instead
+     * @see {@link #auth()}
      */
     @Deprecated
     AuthFuture authAgent(String username) throws IOException;
 
     /**
      * Authenticate the session with the given username and password.
+     *
+     * @deprecated Use {@link #auth()} instead
+     * @see {@link #auth()}
      */
     @Deprecated
     AuthFuture authPassword(String username, String password) throws IOException;
 
     /**
      * Authenticate the session with the given username and password.
+     *
+     * @deprecated Use {@link #auth()} instead
+     * @see {@link #auth()}
      */
     @Deprecated
     AuthFuture authInteractive(String username, String password) throws IOException;
 
     /**
      * Authenticate the session with the given username and public key.
+     *
+     * @deprecated Use {@link #auth()} instead
+     * @see {@link #auth()}
      */
     @Deprecated
     AuthFuture authPublicKey(String username, KeyPair key) throws IOException;

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/9f24b181/sshd-core/src/main/java/org/apache/sshd/SshClient.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/SshClient.java b/sshd-core/src/main/java/org/apache/sshd/SshClient.java
index 27ba0da..9eb47b8 100644
--- a/sshd-core/src/main/java/org/apache/sshd/SshClient.java
+++ b/sshd-core/src/main/java/org/apache/sshd/SshClient.java
@@ -271,6 +271,9 @@ public class SshClient extends AbstractFactoryManager implements ClientFactoryMa
         return future;
     }
 
+    /**
+     * @deprecated Use {@link #connect(String, String, int)} instead
+     */
     @Deprecated
     public ConnectFuture connect(String host, int port) throws IOException {
         return connect(null, host, port);