feat: add native OAuth/OIDC authentication support

Add OAuthConfig and OAuthHeaderProvider to the Rust core with support
for five OAuth flows: ClientCredentials, AuthorizationCodePKCE,
DeviceCode, AzureManagedIdentity, and WorkloadIdentity. Token
acquisition and auto-refresh happen entirely in Rust.

Python and TypeScript expose OAuthConfig as a plain config object that
maps to the Rust header provider via FFI — no dynamic callbacks cross
the language boundary.

ConnectBuilder gains an oauth_config() method that replaces the API key
requirement when OAuth is configured.
This commit is contained in:
Jack Ye
2026-05-12 12:53:19 -07:00
parent 650f173236
commit b4f2300f80
58 changed files with 1859 additions and 449 deletions

View File

@@ -11,8 +11,7 @@ function RecordBatchIterator(promisedInner): AsyncGenerator<RecordBatch<any>, vo
```
## Parameters
* **promisedInner**: `Promise`&lt;`RecordBatchIterator`&gt;
* **promisedInner**: `Promise`&lt;`RecordBatchIterator`&gt;
## Returns

View File

@@ -25,17 +25,13 @@ Accepted formats:
- `db://host:port` - remote database (LanceDB cloud)
### Parameters
* **uri**: `string`
* **uri**: `string`
The uri of the database. If the database uri starts
with `db://` then it connects to a remote database.
* **options?**: `Partial`&lt;[`ConnectionOptions`](../interfaces/ConnectionOptions.md)&gt;
* **options?**: `Partial`&lt;[`ConnectionOptions`](../interfaces/ConnectionOptions.md)&gt;
The options to use when connecting to the database
* **session?**: [`Session`](../classes/Session.md)
* **headerProvider?**: [`HeaderProvider`](../classes/HeaderProvider.md) \| () => `Record`&lt;`string`, `string`&gt; \| () => `Promise`&lt;`Record`&lt;`string`, `string`&gt;&gt;
* **session?**: [`Session`](../classes/Session.md)
* **headerProvider?**: [`HeaderProvider`](../classes/HeaderProvider.md) \| () => `Record`&lt;`string`, `string`&gt; \| () => `Promise`&lt;`Record`&lt;`string`, `string`&gt;&gt;
### Returns
@@ -85,8 +81,7 @@ Accepted formats:
- `db://host:port` - remote database (LanceDB cloud)
### Parameters
* **options**: `Partial`&lt;[`ConnectionOptions`](../interfaces/ConnectionOptions.md)&gt; & `object`
* **options**: `Partial`&lt;[`ConnectionOptions`](../interfaces/ConnectionOptions.md)&gt; & `object`
The options to use when connecting to the database
### Returns

View File

@@ -46,12 +46,9 @@ rules are as follows:
- Array<any> => List
## Parameters
* **data**: `Record`&lt;`string`, `unknown`&gt;[]
* **options?**: `Partial`&lt;[`MakeArrowTableOptions`](../classes/MakeArrowTableOptions.md)&gt;
* **metadata?**: `Map`&lt;`string`, `string`&gt;
* **data**: `Record`&lt;`string`, `unknown`&gt;[]
* **options?**: `Partial`&lt;[`MakeArrowTableOptions`](../classes/MakeArrowTableOptions.md)&gt;
* **metadata?**: `Map`&lt;`string`, `string`&gt;
## Returns

View File

@@ -11,8 +11,7 @@ function packBits(data): number[]
```
## Parameters
* **data**: `number`[]
* **data**: `number`[]
## Returns

View File

@@ -13,8 +13,7 @@ function permutationBuilder(table): PermutationBuilder
Create a permutation builder for the given table.
## Parameters
* **table**: [`Table`](../classes/Table.md)
* **table**: [`Table`](../classes/Table.md)
The source table to create a permutation from
## Returns