public class Authenticator extends QuickAuthenticationHandler
Username : Admin
Password : QsAdm1n
Constructor and Description |
---|
Authenticator() |
Modifier and Type | Method and Description |
---|---|
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.
|
handleAuthentication, handleAuthentication
public AuthStatus askAuthentication(ClientHandler handler) throws java.io.IOException, AppException
ClientAuthenticationHandler
askAuthentication
in interface ClientAuthenticationHandler
askAuthentication
in class QuickAuthenticationHandler
java.io.IOException
- if io error in socketAppException
- if client socket needs to be closed.public AuthStatus handleAuthentication(ClientHandler handler, java.lang.String command) throws java.io.IOException, AppException
ClientAuthenticationHandler
handleAuthentication
in interface ClientAuthenticationHandler
handleAuthentication
in class QuickAuthenticationHandler
java.io.IOException
- if io error in socketAppException
- if client socket needs to be closed.protected static boolean validate(java.lang.String username, byte[] password)
Copyright © 2003-2014 QuickServer.org