Table of Contents

Class CaptchaPoliciesClient

Namespace
Auth0.ManagementApi.AttackProtection
Assembly
Auth0.ManagementApi.dll
public class CaptchaPoliciesClient : ICaptchaPoliciesClient
Inheritance
CaptchaPoliciesClient
Implements
Inherited Members
Extension Methods

Methods

CreateAsync(CreateAttackProtectionCaptchaPolicyRequestContent, RequestOptions?, CancellationToken)

Create a new CAPTCHA attack protection policy for the tenant. The maximum number of policies per tenant is determined by the tenant's subscription.

public WithRawResponseTask<AttackProtectionCaptchaPolicy> CreateAsync(CreateAttackProtectionCaptchaPolicyRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request CreateAttackProtectionCaptchaPolicyRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<AttackProtectionCaptchaPolicy>

Examples

await client.AttackProtection.CaptchaPolicies.CreateAsync(
    new CreateAttackProtectionCaptchaPolicyRequestContent
    {
        Name = "name",
        Priority = 1,
        Match = new AttackProtectionCaptchaPolicyMatch(),
        Action = new AttackProtectionCaptchaPolicyActionInput(),
    }
);

DeleteAsync(string, RequestOptions?, CancellationToken)

Delete a CAPTCHA attack protection policy for the tenant.

public WithRawResponseTask DeleteAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask

Examples

await client.AttackProtection.CaptchaPolicies.DeleteAsync("id");

GetAsync(string, RequestOptions?, CancellationToken)

Retrieve a single CAPTCHA attack protection policy for the tenant by ID.

public WithRawResponseTask<AttackProtectionCaptchaPolicy> GetAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<AttackProtectionCaptchaPolicy>

Examples

await client.AttackProtection.CaptchaPolicies.GetAsync("id");

ListAsync(RequestOptions?, CancellationToken)

Retrieve all CAPTCHA attack protection policies for the tenant, sorted by priority ascending.

public WithRawResponseTask<IEnumerable<AttackProtectionCaptchaPolicy>> ListAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<IEnumerable<AttackProtectionCaptchaPolicy>>

Examples

await client.AttackProtection.CaptchaPolicies.ListAsync();

UpdateAsync(string, UpdateAttackProtectionCaptchaPolicyRequestContent, RequestOptions?, CancellationToken)

Partially update a CAPTCHA attack protection policy. Only the provided fields are modified. A provided match or action replaces the stored value in full rather than merging with it; within action, a provider secret or API key that is omitted from a provided provider block keeps its stored value.

public WithRawResponseTask<AttackProtectionCaptchaPolicy> UpdateAsync(string id, UpdateAttackProtectionCaptchaPolicyRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
request UpdateAttackProtectionCaptchaPolicyRequestContent
options RequestOptions
cancellationToken CancellationToken

Returns

WithRawResponseTask<AttackProtectionCaptchaPolicy>

Examples

await client.AttackProtection.CaptchaPolicies.UpdateAsync(
    "id",
    new UpdateAttackProtectionCaptchaPolicyRequestContent()
);