# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLNET::CLoginCookie Class Reference

Manage cookie during the authenticate procedure. More...

#include <login_cookie.h>

List of all members.

Public Methods

 CLoginCookie (uint32 addr, uint32 id)
 CLoginCookie ()
void serial (NLMISC::IStream &s)
std::string setToString ()
void setFromString (const std::string &str)
std::string toString () const
uint32 getUserAddr () const
uint32 getUserKey () const
uint32 getUserId () const
void set (uint32 ua, uint32 uk, uint32 ui)
bool isValid () const
void clear ()
uint32 generateKey ()

Private Attributes

bool _Valid
uint32 _UserAddr
uint32 _UserKey
uint32 _UserId

Friends

bool operator== (const CLoginCookie &c1, const CLoginCookie &c2)
 Comparison == operator. More...


Detailed Description

Manage cookie during the authenticate procedure.

_UserAddr is the ipv4 address of the client in uint32 _UserKey is an uint32 generated by the login_service at each login password verification _UserId is an uint32 uniq for each account (an account could have more than one avatar)

Author:
Vianney Lecroart , Nevrax France
Date:
2001

Definition at line 49 of file login_cookie.h.


Constructor & Destructor Documentation

NLNET::CLoginCookie::CLoginCookie uint32    addr,
uint32    id
 

Definition at line 47 of file login_cookie.cpp.

References _UserKey, addr, generateKey, and id.

NLNET::CLoginCookie::CLoginCookie   [inline]
 

Definition at line 54 of file login_cookie.h.

References _Valid.


Member Function Documentation

void NLNET::CLoginCookie::clear   [inline]
 

Definition at line 110 of file login_cookie.h.

References _Valid.

uint32 NLNET::CLoginCookie::generateKey  
 

Todo:
ace: is the cookie enough to avoid hackers to predice keys?

Definition at line 55 of file login_cookie.cpp.

References r, and t.

Referenced by CLoginCookie.

uint32 NLNET::CLoginCookie::getUserAddr   const [inline]
 

Definition at line 103 of file login_cookie.h.

References _UserAddr, _Valid, and nlassert.

uint32 NLNET::CLoginCookie::getUserId   const [inline]
 

Definition at line 105 of file login_cookie.h.

References _UserId, _Valid, and nlassert.

uint32 NLNET::CLoginCookie::getUserKey   const [inline]
 

Definition at line 104 of file login_cookie.h.

References _UserKey, _Valid, and nlassert.

bool NLNET::CLoginCookie::isValid void    const [inline]
 

Definition at line 109 of file login_cookie.h.

References _Valid.

void NLNET::CLoginCookie::serial NLMISC::IStream   s [inline]
 

Definition at line 56 of file login_cookie.h.

References _UserAddr, _UserId, _UserKey, _Valid, NLMISC::IStream::isReading, nlwarning, s, and NLMISC::IStream::serial.

void NLNET::CLoginCookie::set uint32    ua,
uint32    uk,
uint32    ui
[inline]
 

Definition at line 107 of file login_cookie.h.

References _UserAddr, _UserId, _UserKey, and _Valid.

void NLNET::CLoginCookie::setFromString const std::string &    str [inline]
 

Definition at line 83 of file login_cookie.h.

References _UserAddr, _UserId, _UserKey, _Valid, nlinfo, and toString.

std::string NLNET::CLoginCookie::setToString   [inline]
 

Definition at line 68 of file login_cookie.h.

References _UserAddr, _UserId, _UserKey, nlinfo, NLMISC::smprintf, and toString.

std::string NLNET::CLoginCookie::toString   const [inline]
 

Definition at line 95 of file login_cookie.h.

References _UserAddr, _UserId, _UserKey, and NLMISC::toString.

Referenced by setFromString, and setToString.


Friends And Related Function Documentation

bool operator== const CLoginCookie &    c1,
const CLoginCookie &    c2
[friend]
 

Comparison == operator.

Definition at line 40 of file login_cookie.cpp.


Member Data Documentation

uint32 NLNET::CLoginCookie::_UserAddr [private]
 

Definition at line 121 of file login_cookie.h.

Referenced by getUserAddr, serial, set, setFromString, setToString, and toString.

uint32 NLNET::CLoginCookie::_UserId [private]
 

Definition at line 123 of file login_cookie.h.

Referenced by getUserId, serial, set, setFromString, setToString, and toString.

uint32 NLNET::CLoginCookie::_UserKey [private]
 

Definition at line 122 of file login_cookie.h.

Referenced by CLoginCookie, getUserKey, serial, set, setFromString, setToString, and toString.

bool NLNET::CLoginCookie::_Valid [private]
 

Definition at line 119 of file login_cookie.h.

Referenced by clear, CLoginCookie, getUserAddr, getUserId, getUserKey, isValid, serial, set, and setFromString.


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