Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

SessionTracker Class Reference

#include <SessionTracker.h>

List of all members.

Public Methods

 SessionTracker (int timeout)
void harvest ()
UserProfile * getUser (string secret)
void closeSession (string secret)
string openSession ()
void annotateSession (string secret, string username, string challenge)
string * getUsername (string secret)
string * getChallenge (string secret)
bool validateSession (string secret)
void invalidateSession (string secret)
bool sessionExists (string secret)


Detailed Description

the SessionTracker manages UserSessions and secrets that the clients have. clients trade secrets for sessions when they have to do something with the core.


Constructor & Destructor Documentation

SessionTracker::SessionTracker (  int    timeout ) 
 

constructor. creates hashmap for secret -> session relation


Member Function Documentation

void SessionTracker::annotateSession (  string    secret,
string    username,
string    challenge
) 
 

Store username and challenge in session We will need them in login

void SessionTracker::closeSession (  string    secret ) 
 

removes session and delete profile and secret

string * SessionTracker::getChallenge (  string    secret ) 
 

get challenge from session.

UserProfile * SessionTracker::getUser (  string    secret ) 
 

trade secret for profile returns true on succes or false on invalid session.

string * SessionTracker::getUsername (  string    secret ) 
 

get username from session.

void SessionTracker::harvest (    ) 
 

harvest dead sessions once every 15 seconds.

void SessionTracker::invalidateSession (  string    secret ) 
 

mark session inactive

string SessionTracker::openSession (    ) 
 

creates session, returns a secret

bool SessionTracker::sessionExists (  string    secret ) 
 

test if exists

bool SessionTracker::validateSession (  string    secret ) 
 

mark session active


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:57 2004 for strongroom by doxygen1.2.18