blob: 34bd250d13bdc40eb806069c6887badb03a69342 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/**
* holds a cache of all the user data fetched from SQL
*/
module.exports = class Session {
expires = new Date(); // expiry Date
vault = null; // Vault account id
authenticated = false; // whether the user logged in
identity = null; // the identity that was used to log in
email; // the email address of the identity that was used to log in
identities = []; // cache holding all identities
primaryIdentity = null; // the main identity of the account
allowNonPrimary = true; // whether to allow logging in with a non-primary ident
legacyAccounts = []; // cache holding all legacy game accounts
gameAccounts = []; // cache holding all evol game accounts
ip; // ip that was used to init the session
constructor (ip, email) {
this.ip = ip;
this.email = email;
}
}
|