import { Token } from './Token'; import { IJWTVerifyOptions } from './IJWTVerifyOptions'; import { IAuthTokenData } from './IAuthTokenData'; import { StringValue } from 'ms'; export type TExpiresIn = StringValue | number; export declare class TokenManager { private $secret; constructor(secret: string); sign(payload: { [key: string]: any; }, expiresIn: TExpiresIn): Promise; verify(token: Token, options?: IJWTVerifyOptions): Promise; /** * Decodes the token. Use this method only on verified tokens as this does not verify against tampering * * @param token * @returns */ decodeSync(token: Token): TAuthToken; /** * Decodes the token. Use this method only on verified tokens as this does not verify against tampering * * @param token * @returns */ decode(token: Token): Promise; }