QuickServer
v1.4.7

org.quickserver.net.qsadmin
Class Authenticator

java.lang.Object
  extended byorg.quickserver.net.server.QuickAuthenticationHandler
      extended byorg.quickserver.net.qsadmin.Authenticator
All Implemented Interfaces:
ClientAuthenticationHandler

public class Authenticator
extends QuickAuthenticationHandler

Default QSAdminServer ServerAuthenticator.

Username : Admin
Password : QsAdm1n

Since:
1.1

Constructor Summary
Authenticator()
           
 
Method Summary
 AuthStatus askAuthentication(ClientHandler handler)
          Method called first time after gotConnected() method is caled on ClientEventHandler, if Authenticator is set.
 AuthStatus handleAuthentication(ClientHandler handler, java.lang.String command)
          Method called when ever a client sends character/string data before authentication.
protected static boolean validate(java.lang.String username, byte[] password)
          This function is used to validate username and password.
 
Methods inherited from class org.quickserver.net.server.QuickAuthenticationHandler
handleAuthentication, handleAuthentication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authenticator

public Authenticator()
Method Detail

askAuthentication

public AuthStatus askAuthentication(ClientHandler handler)
                             throws java.io.IOException,
                                    AppException
Description copied from interface: ClientAuthenticationHandler
Method called first time after gotConnected() method is caled on ClientEventHandler, if Authenticator is set. Should be used to initate a authorisation process, like asking for username.

Specified by:
askAuthentication in interface ClientAuthenticationHandler
Overrides:
askAuthentication in class QuickAuthenticationHandler
Throws:
java.io.IOException
AppException

handleAuthentication

public AuthStatus handleAuthentication(ClientHandler handler,
                                       java.lang.String command)
                                throws java.io.IOException,
                                       AppException
Description copied from interface: ClientAuthenticationHandler
Method called when ever a client sends character/string data before authentication.

Specified by:
handleAuthentication in interface ClientAuthenticationHandler
Overrides:
handleAuthentication in class QuickAuthenticationHandler
Throws:
java.io.IOException
AppException

validate

protected static boolean validate(java.lang.String username,
                                  byte[] password)
This function is used to validate username and password. May be overridden to change username and/or password.


QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org