@oxia-db/client - v0.1.0
    Preparing search index...

    Interface Authentication

    Pluggable authentication for Oxia client RPCs. Implementations return a map of gRPC metadata entries to attach to every outgoing call (for example, { authorization: 'Bearer <token>' }). Authentication.generateCredentials is invoked once per RPC, so dynamic token-refresh schemes work by returning a fresh value on each call.

    interface Authentication {
        generateCredentials(): | Record<string, string>
        | Promise<Record<string, string>>;
    }

    Implemented by

    Index

    Methods

    • Return the gRPC metadata to attach to the next outgoing RPC. Keys are interpreted as header names (gRPC will lowercase them); values are arbitrary strings.

      May return a plain object or a Promise for async refresh. If this method throws or the returned Promise rejects, the affected call is cancelled with gRPC status UNAUTHENTICATED.

      Returns Record<string, string> | Promise<Record<string, string>>