getIntegrationsConnectorsByIdToken method

Future<ConnectorTokenOut?> getIntegrationsConnectorsByIdToken(
  1. String id
)

Hands the custodied access token to its owner — the ONE place custody exits.

Hands the custodied access token to its owner — the ONE place custody exits. The (org,user)-keyed row IS the same-user gate: another user's id is simply "no row" → 404. fresh() auto-rotates within the refreshSkew window; static providers degenerate to a plain kmsGet of Secrets0. Refresh tokens are NEVER returned — custody keeps the sink. The token is never logged.

Parameters:

  • String id (required): ID is the connector id, provider + ":" + label ("openai:default") — the auth-profile-id shape. Another user's id is simply no row, so 404.

Implementation

Future<ConnectorTokenOut?> getIntegrationsConnectorsByIdToken(String id,) async {
  final response = await getIntegrationsConnectorsByIdTokenWithHttpInfo(id,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConnectorTokenOut',) as ConnectorTokenOut;

  }
  return null;
}