diff options
author | gumi <git@gumi.ca> | 2020-02-14 12:18:00 -0500 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-03-02 15:37:17 -0500 |
commit | 2c25f53ddf418bdedd94c6142b03c80e49fc584d (patch) | |
tree | c15c45c16b7b649fb267241ffe0fe90aacf6fae5 /src/routers/vault/types/Session.js | |
parent | 872288426090839f2f23e60187a58ee51d6fe4ea (diff) | |
download | api-2c25f53ddf418bdedd94c6142b03c80e49fc584d.tar.gz api-2c25f53ddf418bdedd94c6142b03c80e49fc584d.tar.bz2 api-2c25f53ddf418bdedd94c6142b03c80e49fc584d.tar.xz api-2c25f53ddf418bdedd94c6142b03c80e49fc584d.zip |
add support for Vault + major refactor
Diffstat (limited to 'src/routers/vault/types/Session.js')
-rw-r--r-- | src/routers/vault/types/Session.js | 21 |
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; + } +} |