/// import { Secret, SignOptions, JwtHeader } from 'jsonwebtoken'; import { JwtPayload } from '../models/jwt.model'; /** * An encoded token. */ export interface EncodedJwt { /** * The header of the jwt, contains mostly metadata. */ header: JwtHeader; /** * The payload of the jwt, everything that was put inside the token when generating it can be found here. */ payload: JwtPayload; /** * The signature of the jwt. */ signature: string; } /** * Encapsulates functionality of the jsonwebtoken package. */ export declare abstract class JwtUtilities { /** * Asynchronously sign the given payload into a JSON Web Token string payload. * @param payload - Any info that should be put inside the token. * @param secret - The secret used to encrypt the token. * @param options - Additional options like "expiresIn". * @returns A promise of the jwt. */ static signAsync(payload: string | Buffer | object, secret: Secret, options?: SignOptions): Promise; /** * Asynchronously verify given token using a secret or a public key to get a decoded token. * @param token - The token to encode. * @param secret - The secret to encode the token with. * @returns The encoded token. */ static verifyAsync(token: string, secret: Secret): Promise>; }