registerOpentdfConfig method

Future<RegisterOpentdfConfigResponse> registerOpentdfConfig({
  1. required String clientId,
  2. required String clientSecret,
  3. required String domain,
  4. required String networkId,
  5. required String provider,
  6. bool? dryRun,
})

Registers and saves OpenTDF configuration for a Wickr network, enabling attribute-based access control for Wickr through an OpenTDF provider.

May throw BadRequestError. May throw ForbiddenError. May throw InternalServerError. May throw RateLimitError. May throw ResourceNotFoundError. May throw UnauthorizedError. May throw ValidationError.

Parameter clientId : The OIDC client ID used for authenticating with the OpenTDF provider.

Parameter clientSecret : The OIDC client secret used for authenticating with the OpenTDF provider

Parameter domain : The domain of the OpenTDF server.

Parameter networkId : The ID of the Wickr network for which OpenTDF integration will be configured.

Parameter provider : The provider of the OpenTDF platform.

Parameter dryRun : Perform dry-run test connection of OpenTDF configuration (optional).

Implementation

Future<RegisterOpentdfConfigResponse> registerOpentdfConfig({
  required String clientId,
  required String clientSecret,
  required String domain,
  required String networkId,
  required String provider,
  bool? dryRun,
}) async {
  final $query = <String, List<String>>{
    if (dryRun != null) 'dryRun': [dryRun.toString()],
  };
  final $payload = <String, dynamic>{
    'clientId': clientId,
    'clientSecret': clientSecret,
    'domain': domain,
    'provider': provider,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/networks/${Uri.encodeComponent(networkId)}/tdf',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return RegisterOpentdfConfigResponse.fromJson(response);
}