summaryrefslogtreecommitdiff
path: root/src/routers/vault/types/Session.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routers/vault/types/Session.js')
-rw-r--r--src/routers/vault/types/Session.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/routers/vault/types/Session.js b/src/routers/vault/types/Session.js
new file mode 100644
index 0000000..34bd250
--- /dev/null
+++ b/src/routers/vault/types/Session.js
@@ -0,0 +1,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;
+ }
+}