TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.captcha.update({});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.captcha.update({});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.UpdateAttackProtectionCaptchaRequestContent{}
mgmt.AttackProtection.Captcha.Update(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api patch "attack-protection/captcha" --data '{}'using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.AttackProtection.Captcha.UpdateAsync(
new UpdateAttackProtectionCaptchaRequestContent()
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().captcha().update(
UpdateAttackProtectionCaptchaRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\Captcha\Requests\UpdateAttackProtectionCaptchaRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->captcha->update(
new UpdateAttackProtectionCaptchaRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.captcha.update()
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.captcha.update
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simple_captcha": {}
}
'{
"active_provider_id": "<string>",
"arkose": {
"site_key": "<string>",
"fail_open": true,
"client_subdomain": "<string>",
"verify_subdomain": "<string>"
},
"auth_challenge": {
"fail_open": true
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"recaptcha_v2": {
"site_key": "<string>"
},
"simple_captcha": {}
}Mise à jour partielle de la configuration du captcha
Mettre à jour la configuration CAPTCHA existante de votre client.
PATCH
https://{tenantDomain}/api/v2
/
attack-protection
/
captcha
TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.captcha.update({});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.captcha.update({});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.UpdateAttackProtectionCaptchaRequestContent{}
mgmt.AttackProtection.Captcha.Update(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api patch "attack-protection/captcha" --data '{}'using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.AttackProtection.Captcha.UpdateAsync(
new UpdateAttackProtectionCaptchaRequestContent()
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.UpdateAttackProtectionCaptchaRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().captcha().update(
UpdateAttackProtectionCaptchaRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\Captcha\Requests\UpdateAttackProtectionCaptchaRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->captcha->update(
new UpdateAttackProtectionCaptchaRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.captcha.update()
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.captcha.update
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/captcha \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"simple_captcha": {}
}
'{
"active_provider_id": "<string>",
"arkose": {
"site_key": "<string>",
"fail_open": true,
"client_subdomain": "<string>",
"verify_subdomain": "<string>"
},
"auth_challenge": {
"fail_open": true
},
"hcaptcha": {
"site_key": "<string>"
},
"friendly_captcha": {
"site_key": "<string>"
},
"recaptcha_enterprise": {
"site_key": "<string>",
"project_id": "<string>"
},
"recaptcha_v2": {
"site_key": "<string>"
},
"simple_captcha": {}
}Autorisations
bearerAuthoAuth2ClientCredentials
Corps
application/jsonapplication/x-www-form-urlencoded
Réponse
Configuration CAPTCHA récupérée avec succès.