import { P12ReaderData } from '../P12Reader'; interface DecodedToken { valor: string; timestamp: string; iat: number; exp: number; } /** * Custom Authentication class for generating and verifying tokens */ declare class CustomAuthentication { private cert; constructor(cert: P12ReaderData); generateSeed(): string; verifySignedSeed(signedXml: string): Promise; /** * This function get the original XML and remove the signature node, then it signs the original XML again to extract the digest value * I had a hard time trying to figure out how to calculate the digest value to avoid to sign the document, but the calculated value always return a different value from the original one. * @param signedXml * @returns */ private canonicalizeXmlFn; /** * Access token validation * @param token * @returns */ verifyToken(token: string): Promise<{ decoded: DecodedToken; isExpired: boolean; }>; } export default CustomAuthentication;