gnu.rfb.server
Class DefaultRFBAuthenticator

java.lang.Object
  extended by gnu.rfb.server.DefaultRFBAuthenticator
All Implemented Interfaces:
RFBAuthenticator

public class DefaultRFBAuthenticator
extends java.lang.Object
implements RFBAuthenticator

Provides authentication for the VNC protocol. This implements just the default method of password auth, no username required. Maximum password length is 8 characters, anything beyond that is truncated.


Constructor Summary
DefaultRFBAuthenticator(java.lang.String password)
          Default constructor.
 
Method Summary
 boolean authenticate(java.io.DataInputStream in, java.io.DataOutputStream out, RFBSocket clientSocket)
           
static boolean enterPassword(java.io.DataInputStream in, java.io.DataOutputStream out, java.lang.String password)
           
 int getAuthScheme(RFBClient client)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRFBAuthenticator

public DefaultRFBAuthenticator(java.lang.String password)
Default constructor.

Parameters:
password - The password to authenticate with.
Method Detail

getAuthScheme

public int getAuthScheme(RFBClient client)
Specified by:
getAuthScheme in interface RFBAuthenticator
Returns:

authenticate

public boolean authenticate(java.io.DataInputStream in,
                            java.io.DataOutputStream out,
                            RFBSocket clientSocket)
                     throws java.io.IOException
Specified by:
authenticate in interface RFBAuthenticator
Returns:
Throws:
java.io.IOException

enterPassword

public static boolean enterPassword(java.io.DataInputStream in,
                                    java.io.DataOutputStream out,
                                    java.lang.String password)
                             throws java.io.IOException
Parameters:
in -
out -
password -
Returns:
Throws:
java.io.IOException - Modified by: Ken Breeman (kbreeman@wpi.edu) Eric Griffel (sniffels@wpi.edu)