@opentdf/sdk
    Preparing search index...

    Type Alias AuthProvider

    A utility type for getting and updating a bearer token to associate with HTTP requests to the backend services, notably rewrap and upsert endpoints.

    In the TDF protocol, this bearer token will be a wrapper around a signed ephemeral key, to be included in the claims object.

    type AuthProvider = {
        updateClientPublicKey(signingKey?: CryptoKeyPair): Promise<void>;
        withCreds(httpReq: HttpRequest): Promise<HttpRequest>;
    }

    Implemented by

    Index

    Methods

    • This function should be called if the consumer of this auth provider changes the client keypair, or wishes to set the keypair after creating the object.

      Calling this function will (optionally) trigger a forcible token refresh using the cached refresh token, and update the auth server config with the current key.

      Parameters

      • OptionalsigningKey: CryptoKeyPair

        the client signing key pair. Will be bound to the OIDC token and require a DPoP header, when set.

      Returns Promise<void>