UNPKG

@hellocoop/web-identity

Version:

Functions for generating and verifying JWT tokens used in the Verified Email Autocomplete protocol

56 lines 1.51 kB
/** * Base error class for all web-identity related errors */ export declare class WebIdentityError extends Error { code: string; constructor(message: string, code: string); } /** * Error thrown when a required claim is missing from a JWT */ export declare class MissingClaimError extends WebIdentityError { constructor(claim: string); } /** * Error thrown when JWT signature verification fails */ export declare class InvalidSignatureError extends WebIdentityError { constructor(message?: string); } /** * Error thrown when time-based validation fails (iat claims) */ export declare class TimeValidationError extends WebIdentityError { constructor(message: string); } /** * Error thrown when token format is invalid or malformed */ export declare class TokenFormatError extends WebIdentityError { constructor(message: string); } /** * Error thrown when JWK validation fails */ export declare class JWKValidationError extends WebIdentityError { constructor(message: string); } /** * Error thrown when email validation fails */ export declare class EmailValidationError extends WebIdentityError { constructor(message: string); } /** * Error thrown when DNS discovery fails */ export declare class DNSDiscoveryError extends WebIdentityError { constructor(message: string); } /** * Error thrown when JWKS fetching fails */ export declare class JWKSFetchError extends WebIdentityError { constructor(message: string); } //# sourceMappingURL=errors.d.ts.map