deleteOauth2Credential method

Future<TDeleteOauth2CredentialResponse> deleteOauth2Credential({
  1. required TDeleteOauth2CredentialBody input,
})

Disable authentication for end users with an OAuth 2.0 provider

Sign the provided TDeleteOauth2CredentialBody with the client's stamp function and submit the request (POST /public/v1/submit/delete_oauth2_credential).

See also: stampDeleteOauth2Credential.

Implementation

Future<TDeleteOauth2CredentialResponse> deleteOauth2Credential({
  required TDeleteOauth2CredentialBody input,
}) async {
  final body = packActivityBody(
    bodyJson: input.toJson(),
    fallbackOrganizationId: input.organizationId ??
        config.organizationId ??
        (throw Exception(
            "Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
    activityType: 'ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL',
  );
  return await request<Map<String, dynamic>, TDeleteOauth2CredentialResponse>(
      "/public/v1/submit/delete_oauth2_credential",
      body,
      (json) => TDeleteOauth2CredentialResponse.fromJson(
          transformActivityResponse(json, 'DeleteOauth2Credential')));
}