socks
Class UserPasswordAuthentication

java.lang.Object
  |
  +--socks.UserPasswordAuthentication

public class UserPasswordAuthentication
extends java.lang.Object
implements Authentication

SOCKS5 User Password authentication scheme.


Field Summary
static int METHOD_ID
          SOCKS ID for User/Password authentication method
 
Constructor Summary
UserPasswordAuthentication(java.lang.String userName, java.lang.String password)
          Create an instance of UserPasswordAuthentication.
 
Method Summary
 java.lang.Object[] doSocksAuthentication(int methodId, java.net.Socket proxySocket)
          Does User/Password authentication as defined in rfc1929.
 java.lang.String getPassword()
          Get password
 java.lang.String getUser()
          Get the user name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_ID

public static final int METHOD_ID
SOCKS ID for User/Password authentication method
Constructor Detail

UserPasswordAuthentication

public UserPasswordAuthentication(java.lang.String userName,
                                  java.lang.String password)
Create an instance of UserPasswordAuthentication.
Parameters:
userName - User Name to send to SOCKS server.
password - Password to send to SOCKS server.
Method Detail

getUser

public java.lang.String getUser()
Get the user name.
Returns:
User name.

getPassword

public java.lang.String getPassword()
Get password
Returns:
Password

doSocksAuthentication

public java.lang.Object[] doSocksAuthentication(int methodId,
                                                java.net.Socket proxySocket)
                                         throws java.io.IOException
Does User/Password authentication as defined in rfc1929.
Specified by:
doSocksAuthentication in interface Authentication
Returns:
An array containnig in, out streams, or null if authentication fails.