Utility class for JWS related operations.

Constructors

Methods

  • Decodes the payload of the given JWS object as a plain object.

    Parameters

    • jws: GeneralJws

    Returns any

  • Extracts the DID from the given kid string.

    Parameters

    • kid: string

    Returns string

  • Gets the kid from a general JWS signature entry.

    Parameters

    • signatureEntry: SignatureEntry

    Returns string

  • Gets the signer DID from a general JWS signature entry.

    Parameters

    • signatureEntry: SignatureEntry

    Returns string

  • Verifies the signature against the given payload.

    Parameters

    • base64UrlPayload: string
    • signatureEntry: SignatureEntry
    • jwkPublic: PublicJwk

    Returns Promise<boolean>

    true if signature is valid; false otherwise