@veraid/kliento
    Preparing search index...

    Class TokenBundle

    Kliento token bundle.

    Index

    Methods

    • Serialise the token bundle.

      Returns ArrayBuffer

      The serialised token bundle.

    • Deserialise a token bundle from an authorization header.

      Parameters

      • header: string

        The authorization header.

      Returns TokenBundle

      The token bundle.

      An error if the authorization scheme is not "Kliento" or the token bundle is malformed.

      This value requires the scheme "Kliento" and the token bundle to be base64-encoded.

    • Sign a token.

      Parameters

      • token: Token

        The token to sign.

      • privateKey: CryptoKey

        The private key to sign the token with.

      • chain: Chain

        The chain to sign the token with.

      • expiry: Date

        The expiry date of the token.

      • options: Partial<TokenBundleOptions> = {}

        The options for the token bundle.

      Returns Promise<TokenBundle>

      A new token bundle.