Skip to content

ConnectionCredential

type ConnectionCredential =
| {
apiKey: string;
keys?: never;
token?: never;
}
| {
apiKey?: never;
keys: KeyPoolOptions;
token?: never;
}
| {
apiKey?: never;
keys?: never;
token: TokenSource;
};

Defined in: core/src/registry.ts:33

How a connection signs its calls: exactly one of the three.

{
apiKey: string;
keys?: never;
token?: never;
}

{
apiKey?: never;
keys: KeyPoolOptions;
token?: never;
}

Several keys for one account, rotated by one KeyPool per connection.


{
apiKey?: never;
keys?: never;
token: TokenSource;
}

A signed-in user’s token (@providerkit/core/auth), renewed on a 401.