basalt / drives/src / DriveCredentials
Class: DriveCredentials
Defined in: drives/src/credentials.ts:55
Constructors
Constructor
> new DriveCredentials(options): DriveCredentials
Defined in: drives/src/credentials.ts:72
Parameters
options
Returns
DriveCredentials
Methods
refreshNow()
> refreshNow(connection, authorization): Promise<ActiveCredentials>
Defined in: drives/src/credentials.ts:122
Forces a refresh — what a caller does after the provider answers 401 with a token we believed was still valid (clock skew, a revoked-then-reissued grant, a provider that expires early under load).
Parameters
connection
authorization
Returns
Promise<ActiveCredentials>
seal()
> seal(tokens, context): string
Defined in: drives/src/credentials.ts:78
Seals a token set for storage against one connection's identity.
Parameters
tokens
context
connectionId
string
provider
string
tenantId
string
Returns
string
use()
> use(connection, authorization): Promise<ActiveCredentials>
Defined in: drives/src/credentials.ts:108
Returns a usable access token for connection, refreshing first if needed.
Refuses outright for a connection that is not active: a connection whose grant we already know is gone must not generate provider traffic on every queued job.
Parameters
connection
authorization
Returns
Promise<ActiveCredentials>