kinetex - v1.0.0-rc.1
    Preparing search index...

    Type Alias AuthConfig

    AuthConfig:
        | { type: "bearer"; token: string
        | (() => string | Promise<string>) }
        | { type: "basic"; username: string; password: string }
        | {
            type: "apikey";
            header: string;
            key: string | (() => string | Promise<string>);
        }
        | { type: "digest"; username: string; password: string }
        | {
            type: "custom";
            apply: (
                req: KinetexRequest,
            ) => KinetexRequest | Promise<KinetexRequest> | void;
        }

    Authentication configuration.

    Type Declaration

    • { type: "bearer"; token: string | (() => string | Promise<string>) }
      • type: "bearer"

        Bearer authentication.

      • token: string | (() => string | Promise<string>)

        Token value or a factory function that returns one.

    • { type: "basic"; username: string; password: string }
      • type: "basic"

        HTTP Basic authentication.

      • username: string

        Username for basic auth.

      • password: string

        Password for basic auth.

    • {
          type: "apikey";
          header: string;
          key: string | (() => string | Promise<string>);
      }
      • type: "apikey"

        API key sent via a custom header.

      • header: string

        HTTP header name carrying the key.

      • key: string | (() => string | Promise<string>)

        API key value or a factory function that returns one.

    • { type: "digest"; username: string; password: string }
      • type: "digest"

        HTTP Digest authentication.

      • username: string

        Username for digest auth.

      • password: string

        Password for digest auth.

    • {
          type: "custom";
          apply: (
              req: KinetexRequest,
          ) => KinetexRequest | Promise<KinetexRequest> | void;
      }