UMIS SDK
    Preparing search index...

    Function verifyJws

    • Verifies a compact ES256 JWS and returns it decoded. Checks, in this order, each failing with one code: structure (MALFORMED), alg (UNSUPPORTED_FORMAT), header members (MALFORMED: crit and every member other than alg, typ, kid, jwk and allowHeader), exact typ (UNSUPPORTED_FORMAT), key lookup (ISSUER_KEY_UNKNOWN) and the signature (SIGNATURE_INVALID). With a key array the header kid selects the key; without a kid every key is tried in order, at most eight.

      Type Parameters

      • P = Record<string, unknown>

      Parameters

      • compact: string
      • i: {
            allowHeader?: readonly string[];
            crypto?: CryptoProvider;
            key: VerifyKey;
            typ: string | readonly string[];
        }

      Returns Promise<DecodedJws<P>>