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.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/routers/vault/types/Session.js b/src/routers/vault/types/Session.js
index 9f0cd95..17c77ef 100644
--- a/src/routers/vault/types/Session.js
+++ b/src/routers/vault/types/Session.js
@@ -1,3 +1,5 @@
+const uuidv4 = require("uuid/v4");
+
/**
* holds a cache of all the user data fetched from SQL
*/
@@ -12,6 +14,8 @@ module.exports = class Session {
identity = null;
/** the email address of the identity that was used to log in */
email;
+ /** the secret that is sent after authentication */
+ secret;
/** cache holding all identities */
identities = [];
/** the main identity of the account */
@@ -30,6 +34,7 @@ module.exports = class Session {
constructor (ip, email) {
this.ip = ip;
this.email = email.toLowerCase();
+ this.secret = uuidv4();
}
/**