#include <SessionTracker.h>
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) |
|
constructor. creates hashmap for secret -> session relation |
|
Store username and challenge in session We will need them in login |
|
removes session and delete profile and secret |
|
get challenge from session. |
|
trade secret for profile returns true on succes or false on invalid session. |
|
get username from session. |
|
harvest dead sessions once every 15 seconds. |
|
mark session inactive |
|
creates session, returns a secret |
|
test if exists |
|
mark session active |