
// Defines
#define MAX_USER_LEN  20
#define MAX_SESSIONS 2
#define MAX_USERS 100
#define SESSION_TTL 120

// Structures
struct session {		// Describes web session.
   char session_id[33];		// Session ID, must be unique
   char random[20];		// Random data used for extra user validation
   char user[MAX_USER_LEN];	// Authenticated user
   time_t expire;		// Expiration timestamp, UTC
};

typedef struct {
   char user[MAX_USER_LEN];	// Username
   char password[MAX_USER_LEN];	// Password
} WEBUSER;



