UNPKG

@villedemontreal/jwt-validator

Version:
22 lines 710 B
import { IJWTPayload } from './models/jwtPayload'; /** * JWT validator */ export interface IJwtValidator { /** * Verifies an "Authorization" header containing a JWT, checks * the JWT with the public key and returns the decoded payload. * * @param {string} header * @return {Promise<IJWTPayload>} */ verifyAuthorizationHeader(header: string): Promise<IJWTPayload>; /** * Verifies a JWT with the public key and returns the decoded payload. * @param {string} token * @return {Promise<IJWTPayload>} */ verifyToken(token: string): Promise<IJWTPayload>; } export declare const jwtValidator: IJwtValidator; //# sourceMappingURL=jwtValidator.d.ts.map