added session_uuid & getAllSessions method

This commit is contained in:
SrGooglo 2022-12-14 10:52:40 +00:00
parent 1c7e7ef601
commit 4303d4a2e7

View File

@ -21,6 +21,10 @@ export default class Session {
return this.decodedToken()?.user_id
}
static get session_uuid() {
return this.decodedToken()?.session_uuid
}
static delToken() {
return cookies.remove(Session.tokenKey)
}
@ -31,6 +35,10 @@ export default class Session {
return token && jwt_decode(token)
}
static async getAllSessions() {
return await Session.bridge.get.sessions()
}
//* BASIC HANDLERS
login = (payload, callback) => {
const body = {