zents
Version:
ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.
25 lines • 645 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Session = void 0;
class Session {
constructor(id, user, data, adapter, provider) {
this.id = id;
this.user = user;
this.data = data;
this.adapter = adapter;
this.provider = provider;
}
isAuth() {
return this.user !== null;
}
async destroy() {
await this.adapter.remove(this.id);
this.id = null;
this.user = null;
this.data = null;
this.provider = null;
this.adapter = null;
}
}
exports.Session = Session;
//# sourceMappingURL=Session.js.map