import { IPublicKey, IAccessTokenSigner } from '../types'; import { Jwt } from './Jwt'; /** * {@link JwtVerifier} initialization options. */ export interface IJwtVerifierOptions { /** * Object used to verify signatures of tokens. */ accessTokenSigner: IAccessTokenSigner; /** * API Public Key from Virgil Dashboard to be used to verify signatures * of tokens. */ apiPublicKey: IPublicKey; /** * ID of the API Key from Virgil Dashboard. */ apiKeyId: string; } /** * Class responsible for verification of JWTs. */ export declare class JwtVerifier { /** * @see {@link IJwtVerifierOptions.accessTokenSigner} */ readonly accessTokenSigner: IAccessTokenSigner; /** * @see {@link IJwtVerifierOptions.apiPublicKey} */ readonly apiPublicKey: IPublicKey; /** * @see {@link IJwtVerifierOptions.apiKeyId} */ readonly apiKeyId: string; constructor(options: IJwtVerifierOptions); /** * Verifies the validity of the given JWT. * @param {Jwt} token - The JWT to verify. * @returns {boolean} */ verifyToken(token: Jwt): boolean; private allFieldsAreCorrect; }