UNPKG

lbx-jwt

Version:

Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.

47 lines 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PasswordResetToken = void 0; const tslib_1 = require("tslib"); const repository_1 = require("@loopback/repository"); const base_user_model_1 = require("./base-user.model"); /** * Contains info about a password reset token. */ let PasswordResetToken = class PasswordResetToken extends repository_1.Entity { constructor(data) { super(data); } }; exports.PasswordResetToken = PasswordResetToken; tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', required: true, defaultFn: 'uuidv4', id: true }), tslib_1.__metadata("design:type", String) ], PasswordResetToken.prototype, "id", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'date', required: true }), tslib_1.__metadata("design:type", Date) ], PasswordResetToken.prototype, "expirationDate", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', required: true }), tslib_1.__metadata("design:type", String) ], PasswordResetToken.prototype, "value", void 0); tslib_1.__decorate([ (0, repository_1.belongsTo)(() => base_user_model_1.BaseUser), tslib_1.__metadata("design:type", String) ], PasswordResetToken.prototype, "baseUserId", void 0); exports.PasswordResetToken = PasswordResetToken = tslib_1.__decorate([ (0, repository_1.model)(), tslib_1.__metadata("design:paramtypes", [Object]) ], PasswordResetToken); //# sourceMappingURL=password-reset-token.model.js.map