Planeshift
Public Member Functions | Protected Attributes

psAuthenticationClient Class Reference

Handles Authentication details from the client to the server. More...

#include <authentclient.h>

List of all members.

Public Member Functions

bool Authenticate (const csString &user, const csString &pwd, const csString &pwd256)
 Send a message to the server to login.
const char * GetRejectMessage ()
 Return the reason ( if any ) for a client to be rejected.
virtual void HandleMessage (MsgEntry *mh)
 Handle incomming messages based on the subscribed types.
 psAuthenticationClient (MsgHandler *myMsgQueue)
void Reset (void)
 Clear the status of the login attempt.
int Status (void)
 Get the current status of authentication.
virtual ~psAuthenticationClient ()

Protected Attributes

int iClientApproved
csRef< MsgHandlermsghandler
csString password
csString password256
csString rejectmsg
csString username

Detailed Description

Handles Authentication details from the client to the server.

The basic role of the authentication client is to handle the login/logout functions on the client. When it is created it will subscribe to these types of messages:

This class will also handle disconnect messages from other clients/entities. Thus when other players disconnect or move out of range this class will be responsible for removing them from this client.

Definition at line 80 of file authentclient.h.


Constructor & Destructor Documentation

psAuthenticationClient::psAuthenticationClient ( MsgHandler myMsgQueue)
virtual psAuthenticationClient::~psAuthenticationClient ( ) [virtual]

Member Function Documentation

bool psAuthenticationClient::Authenticate ( const csString &  user,
const csString &  pwd,
const csString &  pwd256 
)

Send a message to the server to login.

Parameters:
userThe account name
pwdThe account password
pwd256The account password
Returns:
Always true.
const char* psAuthenticationClient::GetRejectMessage ( )

Return the reason ( if any ) for a client to be rejected.

virtual void psAuthenticationClient::HandleMessage ( MsgEntry mh) [virtual]

Handle incomming messages based on the subscribed types.

Implements psClientNetSubscriber.

void psAuthenticationClient::Reset ( void  ) [inline]

Clear the status of the login attempt.

Definition at line 126 of file authentclient.h.

int psAuthenticationClient::Status ( void  ) [inline]

Get the current status of authentication.

Possible return values are:

  • NO_RESPONSE
  • APPROVED
  • REJECTED

Definition at line 118 of file authentclient.h.


Member Data Documentation

Definition at line 134 of file authentclient.h.

Definition at line 129 of file authentclient.h.

csString psAuthenticationClient::password [protected]

Definition at line 135 of file authentclient.h.

Definition at line 136 of file authentclient.h.

csString psAuthenticationClient::rejectmsg [protected]

Definition at line 133 of file authentclient.h.

csString psAuthenticationClient::username [protected]

Definition at line 137 of file authentclient.h.


The documentation for this class was generated from the following file: