@3kles/3kles-corebe
Version:
3KLES Core BackEnd
21 lines (20 loc) • 909 B
TypeScript
import * as express from 'express';
import { IAuth } from "./IAuth";
export interface IRefreshTokenModel {
usid: string;
token: string;
isActive: boolean;
expiresAt: number;
createdByIp?: string;
}
export declare abstract class AbstractAuthToken implements IAuth {
protected parameters: any;
protected secretKey: string;
protected expiredTime: string | number;
protected listToken: IRefreshTokenModel[];
constructor(params?: any);
abstract authenticate(req: express.Request, res: express.Response, next: express.NextFunction): Promise<any>;
abstract checkAuth(req: express.Request, res: express.Response, next: express.NextFunction): Promise<void>;
revokeAuth(req: express.Request, res: express.Response, next: express.NextFunction): void;
abstract refreshToken(req: express.Request, res: express.Response, next: express.NextFunction): Promise<void>;
}