@mercury-labs/auth
Version:
Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.
16 lines (15 loc) • 348 B
TypeScript
export interface IJwtPayloadRawDecoded {
iat: number;
exp: number;
username: string;
sub: string;
}
export interface IJwtPayload<T = string> extends Omit<IJwtPayloadRawDecoded, 'sub'> {
sub: T;
}
export declare class JwtPayload implements IJwtPayload {
iat: number;
exp: number;
username: string;
sub: string;
}