games.strategy.net
Interface ILoginValidator

All Known Implementing Classes:
ClientLoginValidator, LobbyLoginValidator

public interface ILoginValidator

Code to validate a login attempt.

Author:
sgb
See Also:
IConnectionLogin

Method Summary
 java.util.Map<java.lang.String,java.lang.String> getChallengeProperties(java.lang.String userName, java.net.SocketAddress remoteAddress)
          The challenge properties to send to the client.
 java.lang.String verifyConnection(java.util.Map<java.lang.String,java.lang.String> propertiesSentToClient, java.util.Map<java.lang.String,java.lang.String> propertiesReadFromClient, java.lang.String clientName, java.net.SocketAddress remoteAddress)
           
 

Method Detail

getChallengeProperties

java.util.Map<java.lang.String,java.lang.String> getChallengeProperties(java.lang.String userName,
                                                                        java.net.SocketAddress remoteAddress)
The challenge properties to send to the client. The client will be sent the challenge properties, and will be expected to return a properties object to validate its connection.


verifyConnection

java.lang.String verifyConnection(java.util.Map<java.lang.String,java.lang.String> propertiesSentToClient,
                                  java.util.Map<java.lang.String,java.lang.String> propertiesReadFromClient,
                                  java.lang.String clientName,
                                  java.net.SocketAddress remoteAddress)
Parameters:
propertiesReadFromClient - - client properties written by the client after receiving the challange string.
remoteAddress - - the remote adress
clientName - - the user name given by the client
Returns:
- null if the attempt was successful, an error message otherwise