package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.UpdateConnectionRequestContent{}
client.Connections.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"is_domain_connection": true,
"metadata": {},
"options": {
"api_enable_groups": true,
"api_enable_users": true,
"attributes": {
"email": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
},
"unique": true
},
"phone_number": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
}
},
"username": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {},
"validation": {
"allowed_types": {
"email": true,
"phone_number": true
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": {
"enabled": true
},
"passkey": {
"enabled": true
},
"password": {
"enabled": true
},
"phone_otp": {
"enabled": true
}
},
"basic_profile": true,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": true,
"enable_script_context": true,
"enabledDatabaseCustomization": true,
"ext_admin": true,
"ext_agreed_terms": true,
"ext_assigned_plans": true,
"ext_groups": true,
"ext_is_suspended": true,
"ext_profile": true,
"federated_connections_access_tokens": {
"active": true
},
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": true,
"subject": "<string>"
},
"id_token_session_expiry_supported": true,
"id_token_signed_response_algs": [],
"import_mode": true,
"non_persistent_attrs": [
"<string>"
],
"passkey_options": {
"local_enrollment_enabled": true,
"progressive_enrollment_enabled": true
},
"password_complexity_options": {
"min_length": 64
},
"password_dictionary": {
"enable": true,
"dictionary": [
"<string>"
]
},
"password_history": {
"enable": true,
"size": 12
},
"password_no_personal_info": {
"enable": true
},
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": true,
"custom": [
"<string>"
]
},
"history": {
"active": true,
"size": 12
},
"profile_data": {
"active": true,
"blocked_fields": [
"<string>"
]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": {
"username": {
"max": 123,
"min": 2
}
}
},
"realms": [
"<string>"
],
"show_as_button": true
}
'import requests
url = "https://{tenantDomain}/api/v2/connections/{id}"
payload = {
"display_name": "<string>",
"enabled_clients": ["<string>"],
"is_domain_connection": True,
"metadata": {},
"options": {
"api_enable_groups": True,
"api_enable_users": True,
"attributes": {
"email": {
"identifier": { "active": True },
"profile_required": True,
"signup": { "verification": { "active": True } },
"unique": True
},
"phone_number": {
"identifier": { "active": True },
"profile_required": True,
"signup": { "verification": { "active": True } }
},
"username": {
"identifier": { "active": True },
"profile_required": True,
"signup": {},
"validation": {
"allowed_types": {
"email": True,
"phone_number": True
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": { "enabled": True },
"passkey": { "enabled": True },
"password": { "enabled": True },
"phone_otp": { "enabled": True }
},
"basic_profile": True,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": True,
"enable_script_context": True,
"enabledDatabaseCustomization": True,
"ext_admin": True,
"ext_agreed_terms": True,
"ext_assigned_plans": True,
"ext_groups": True,
"ext_is_suspended": True,
"ext_profile": True,
"federated_connections_access_tokens": { "active": True },
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": True,
"subject": "<string>"
},
"id_token_session_expiry_supported": True,
"id_token_signed_response_algs": [],
"import_mode": True,
"non_persistent_attrs": ["<string>"],
"passkey_options": {
"local_enrollment_enabled": True,
"progressive_enrollment_enabled": True
},
"password_complexity_options": { "min_length": 64 },
"password_dictionary": {
"enable": True,
"dictionary": ["<string>"]
},
"password_history": {
"enable": True,
"size": 12
},
"password_no_personal_info": { "enable": True },
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": True,
"custom": ["<string>"]
},
"history": {
"active": True,
"size": 12
},
"profile_data": {
"active": True,
"blocked_fields": ["<string>"]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": { "username": {
"max": 123,
"min": 2
} }
},
"realms": ["<string>"],
"show_as_button": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/connections/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'enabled_clients' => [
'<string>'
],
'is_domain_connection' => true,
'metadata' => [
],
'options' => [
'api_enable_groups' => true,
'api_enable_users' => true,
'attributes' => [
'email' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
'verification' => [
'active' => true
]
],
'unique' => true
],
'phone_number' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
'verification' => [
'active' => true
]
]
],
'username' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
],
'validation' => [
'allowed_types' => [
'email' => true,
'phone_number' => true
],
'max_length' => 64.5,
'min_length' => 64.5
]
]
],
'authentication_methods' => [
'email_otp' => [
'enabled' => true
],
'passkey' => [
'enabled' => true
],
'password' => [
'enabled' => true
],
'phone_otp' => [
'enabled' => true
]
],
'basic_profile' => true,
'configuration' => [
],
'customScripts' => [
'change_email' => '<string>',
'change_password' => '<string>',
'change_phone_number' => '<string>',
'change_username' => '<string>',
'create' => '<string>',
'delete' => '<string>',
'get_user' => '<string>',
'login' => '<string>',
'verify' => '<string>'
],
'disable_self_service_change_password' => true,
'enable_script_context' => true,
'enabledDatabaseCustomization' => true,
'ext_admin' => true,
'ext_agreed_terms' => true,
'ext_assigned_plans' => true,
'ext_groups' => true,
'ext_is_suspended' => true,
'ext_profile' => true,
'federated_connections_access_tokens' => [
'active' => true
],
'gateway_authentication' => [
'audience' => '<string>',
'method' => '<string>',
'secret' => '<string>',
'secret_base64_encoded' => true,
'subject' => '<string>'
],
'id_token_session_expiry_supported' => true,
'id_token_signed_response_algs' => [
],
'import_mode' => true,
'non_persistent_attrs' => [
'<string>'
],
'passkey_options' => [
'local_enrollment_enabled' => true,
'progressive_enrollment_enabled' => true
],
'password_complexity_options' => [
'min_length' => 64
],
'password_dictionary' => [
'enable' => true,
'dictionary' => [
'<string>'
]
],
'password_history' => [
'enable' => true,
'size' => 12
],
'password_no_personal_info' => [
'enable' => true
],
'password_options' => [
'complexity' => [
'character_types' => [
],
'min_length' => 36
],
'dictionary' => [
'active' => true,
'custom' => [
'<string>'
]
],
'history' => [
'active' => true,
'size' => 12
],
'profile_data' => [
'active' => true,
'blocked_fields' => [
'<string>'
]
]
],
'precedence' => [
],
'set_user_root_attributes' => 'on_each_login',
'upstream_params' => [
],
'validation' => [
'username' => [
'max' => 123,
'min' => 2
]
]
],
'realms' => [
'<string>'
],
'show_as_button' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/connections/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"enabled_clients\": [\n \"<string>\"\n ],\n \"is_domain_connection\": true,\n \"metadata\": {},\n \"options\": {\n \"api_enable_groups\": true,\n \"api_enable_users\": true,\n \"attributes\": {\n \"email\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n },\n \"unique\": true\n },\n \"phone_number\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n }\n },\n \"username\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {},\n \"validation\": {\n \"allowed_types\": {\n \"email\": true,\n \"phone_number\": true\n },\n \"max_length\": 64.5,\n \"min_length\": 64.5\n }\n }\n },\n \"authentication_methods\": {\n \"email_otp\": {\n \"enabled\": true\n },\n \"passkey\": {\n \"enabled\": true\n },\n \"password\": {\n \"enabled\": true\n },\n \"phone_otp\": {\n \"enabled\": true\n }\n },\n \"basic_profile\": true,\n \"configuration\": {},\n \"customScripts\": {\n \"change_email\": \"<string>\",\n \"change_password\": \"<string>\",\n \"change_phone_number\": \"<string>\",\n \"change_username\": \"<string>\",\n \"create\": \"<string>\",\n \"delete\": \"<string>\",\n \"get_user\": \"<string>\",\n \"login\": \"<string>\",\n \"verify\": \"<string>\"\n },\n \"disable_self_service_change_password\": true,\n \"enable_script_context\": true,\n \"enabledDatabaseCustomization\": true,\n \"ext_admin\": true,\n \"ext_agreed_terms\": true,\n \"ext_assigned_plans\": true,\n \"ext_groups\": true,\n \"ext_is_suspended\": true,\n \"ext_profile\": true,\n \"federated_connections_access_tokens\": {\n \"active\": true\n },\n \"gateway_authentication\": {\n \"audience\": \"<string>\",\n \"method\": \"<string>\",\n \"secret\": \"<string>\",\n \"secret_base64_encoded\": true,\n \"subject\": \"<string>\"\n },\n \"id_token_session_expiry_supported\": true,\n \"id_token_signed_response_algs\": [],\n \"import_mode\": true,\n \"non_persistent_attrs\": [\n \"<string>\"\n ],\n \"passkey_options\": {\n \"local_enrollment_enabled\": true,\n \"progressive_enrollment_enabled\": true\n },\n \"password_complexity_options\": {\n \"min_length\": 64\n },\n \"password_dictionary\": {\n \"enable\": true,\n \"dictionary\": [\n \"<string>\"\n ]\n },\n \"password_history\": {\n \"enable\": true,\n \"size\": 12\n },\n \"password_no_personal_info\": {\n \"enable\": true\n },\n \"password_options\": {\n \"complexity\": {\n \"character_types\": [],\n \"min_length\": 36\n },\n \"dictionary\": {\n \"active\": true,\n \"custom\": [\n \"<string>\"\n ]\n },\n \"history\": {\n \"active\": true,\n \"size\": 12\n },\n \"profile_data\": {\n \"active\": true,\n \"blocked_fields\": [\n \"<string>\"\n ]\n }\n },\n \"precedence\": [],\n \"set_user_root_attributes\": \"on_each_login\",\n \"upstream_params\": {},\n \"validation\": {\n \"username\": {\n \"max\": 123,\n \"min\": 2\n }\n }\n },\n \"realms\": [\n \"<string>\"\n ],\n \"show_as_button\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/connections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"enabled_clients\": [\n \"<string>\"\n ],\n \"is_domain_connection\": true,\n \"metadata\": {},\n \"options\": {\n \"api_enable_groups\": true,\n \"api_enable_users\": true,\n \"attributes\": {\n \"email\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n },\n \"unique\": true\n },\n \"phone_number\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n }\n },\n \"username\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {},\n \"validation\": {\n \"allowed_types\": {\n \"email\": true,\n \"phone_number\": true\n },\n \"max_length\": 64.5,\n \"min_length\": 64.5\n }\n }\n },\n \"authentication_methods\": {\n \"email_otp\": {\n \"enabled\": true\n },\n \"passkey\": {\n \"enabled\": true\n },\n \"password\": {\n \"enabled\": true\n },\n \"phone_otp\": {\n \"enabled\": true\n }\n },\n \"basic_profile\": true,\n \"configuration\": {},\n \"customScripts\": {\n \"change_email\": \"<string>\",\n \"change_password\": \"<string>\",\n \"change_phone_number\": \"<string>\",\n \"change_username\": \"<string>\",\n \"create\": \"<string>\",\n \"delete\": \"<string>\",\n \"get_user\": \"<string>\",\n \"login\": \"<string>\",\n \"verify\": \"<string>\"\n },\n \"disable_self_service_change_password\": true,\n \"enable_script_context\": true,\n \"enabledDatabaseCustomization\": true,\n \"ext_admin\": true,\n \"ext_agreed_terms\": true,\n \"ext_assigned_plans\": true,\n \"ext_groups\": true,\n \"ext_is_suspended\": true,\n \"ext_profile\": true,\n \"federated_connections_access_tokens\": {\n \"active\": true\n },\n \"gateway_authentication\": {\n \"audience\": \"<string>\",\n \"method\": \"<string>\",\n \"secret\": \"<string>\",\n \"secret_base64_encoded\": true,\n \"subject\": \"<string>\"\n },\n \"id_token_session_expiry_supported\": true,\n \"id_token_signed_response_algs\": [],\n \"import_mode\": true,\n \"non_persistent_attrs\": [\n \"<string>\"\n ],\n \"passkey_options\": {\n \"local_enrollment_enabled\": true,\n \"progressive_enrollment_enabled\": true\n },\n \"password_complexity_options\": {\n \"min_length\": 64\n },\n \"password_dictionary\": {\n \"enable\": true,\n \"dictionary\": [\n \"<string>\"\n ]\n },\n \"password_history\": {\n \"enable\": true,\n \"size\": 12\n },\n \"password_no_personal_info\": {\n \"enable\": true\n },\n \"password_options\": {\n \"complexity\": {\n \"character_types\": [],\n \"min_length\": 36\n },\n \"dictionary\": {\n \"active\": true,\n \"custom\": [\n \"<string>\"\n ]\n },\n \"history\": {\n \"active\": true,\n \"size\": 12\n },\n \"profile_data\": {\n \"active\": true,\n \"blocked_fields\": [\n \"<string>\"\n ]\n }\n },\n \"precedence\": [],\n \"set_user_root_attributes\": \"on_each_login\",\n \"upstream_params\": {},\n \"validation\": {\n \"username\": {\n \"max\": 123,\n \"min\": 2\n }\n }\n },\n \"realms\": [\n \"<string>\"\n ],\n \"show_as_button\": true\n}"
response = http.request(request)
puts response.read_body{
"authentication": {
"active": true
},
"connected_accounts": {
"active": true,
"cross_app_access": true
},
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}Actualizar parcialmente una conexión por id
Actualice los detalles de una conexión específica, incluidas las propiedades de las opciones para la configuración del proveedor de identidad.
Nota: Si usa el parámetro options, se reemplazará todo el objeto options. Para evitar datos parciales u otros problemas, asegúrese de que todos los parámetros estén presentes al usar esta opción.
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.UpdateConnectionRequestContent{}
client.Connections.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.connections.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/connections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"is_domain_connection": true,
"metadata": {},
"options": {
"api_enable_groups": true,
"api_enable_users": true,
"attributes": {
"email": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
},
"unique": true
},
"phone_number": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
}
},
"username": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {},
"validation": {
"allowed_types": {
"email": true,
"phone_number": true
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": {
"enabled": true
},
"passkey": {
"enabled": true
},
"password": {
"enabled": true
},
"phone_otp": {
"enabled": true
}
},
"basic_profile": true,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": true,
"enable_script_context": true,
"enabledDatabaseCustomization": true,
"ext_admin": true,
"ext_agreed_terms": true,
"ext_assigned_plans": true,
"ext_groups": true,
"ext_is_suspended": true,
"ext_profile": true,
"federated_connections_access_tokens": {
"active": true
},
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": true,
"subject": "<string>"
},
"id_token_session_expiry_supported": true,
"id_token_signed_response_algs": [],
"import_mode": true,
"non_persistent_attrs": [
"<string>"
],
"passkey_options": {
"local_enrollment_enabled": true,
"progressive_enrollment_enabled": true
},
"password_complexity_options": {
"min_length": 64
},
"password_dictionary": {
"enable": true,
"dictionary": [
"<string>"
]
},
"password_history": {
"enable": true,
"size": 12
},
"password_no_personal_info": {
"enable": true
},
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": true,
"custom": [
"<string>"
]
},
"history": {
"active": true,
"size": 12
},
"profile_data": {
"active": true,
"blocked_fields": [
"<string>"
]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": {
"username": {
"max": 123,
"min": 2
}
}
},
"realms": [
"<string>"
],
"show_as_button": true
}
'import requests
url = "https://{tenantDomain}/api/v2/connections/{id}"
payload = {
"display_name": "<string>",
"enabled_clients": ["<string>"],
"is_domain_connection": True,
"metadata": {},
"options": {
"api_enable_groups": True,
"api_enable_users": True,
"attributes": {
"email": {
"identifier": { "active": True },
"profile_required": True,
"signup": { "verification": { "active": True } },
"unique": True
},
"phone_number": {
"identifier": { "active": True },
"profile_required": True,
"signup": { "verification": { "active": True } }
},
"username": {
"identifier": { "active": True },
"profile_required": True,
"signup": {},
"validation": {
"allowed_types": {
"email": True,
"phone_number": True
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": { "enabled": True },
"passkey": { "enabled": True },
"password": { "enabled": True },
"phone_otp": { "enabled": True }
},
"basic_profile": True,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": True,
"enable_script_context": True,
"enabledDatabaseCustomization": True,
"ext_admin": True,
"ext_agreed_terms": True,
"ext_assigned_plans": True,
"ext_groups": True,
"ext_is_suspended": True,
"ext_profile": True,
"federated_connections_access_tokens": { "active": True },
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": True,
"subject": "<string>"
},
"id_token_session_expiry_supported": True,
"id_token_signed_response_algs": [],
"import_mode": True,
"non_persistent_attrs": ["<string>"],
"passkey_options": {
"local_enrollment_enabled": True,
"progressive_enrollment_enabled": True
},
"password_complexity_options": { "min_length": 64 },
"password_dictionary": {
"enable": True,
"dictionary": ["<string>"]
},
"password_history": {
"enable": True,
"size": 12
},
"password_no_personal_info": { "enable": True },
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": True,
"custom": ["<string>"]
},
"history": {
"active": True,
"size": 12
},
"profile_data": {
"active": True,
"blocked_fields": ["<string>"]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": { "username": {
"max": 123,
"min": 2
} }
},
"realms": ["<string>"],
"show_as_button": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/connections/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'enabled_clients' => [
'<string>'
],
'is_domain_connection' => true,
'metadata' => [
],
'options' => [
'api_enable_groups' => true,
'api_enable_users' => true,
'attributes' => [
'email' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
'verification' => [
'active' => true
]
],
'unique' => true
],
'phone_number' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
'verification' => [
'active' => true
]
]
],
'username' => [
'identifier' => [
'active' => true
],
'profile_required' => true,
'signup' => [
],
'validation' => [
'allowed_types' => [
'email' => true,
'phone_number' => true
],
'max_length' => 64.5,
'min_length' => 64.5
]
]
],
'authentication_methods' => [
'email_otp' => [
'enabled' => true
],
'passkey' => [
'enabled' => true
],
'password' => [
'enabled' => true
],
'phone_otp' => [
'enabled' => true
]
],
'basic_profile' => true,
'configuration' => [
],
'customScripts' => [
'change_email' => '<string>',
'change_password' => '<string>',
'change_phone_number' => '<string>',
'change_username' => '<string>',
'create' => '<string>',
'delete' => '<string>',
'get_user' => '<string>',
'login' => '<string>',
'verify' => '<string>'
],
'disable_self_service_change_password' => true,
'enable_script_context' => true,
'enabledDatabaseCustomization' => true,
'ext_admin' => true,
'ext_agreed_terms' => true,
'ext_assigned_plans' => true,
'ext_groups' => true,
'ext_is_suspended' => true,
'ext_profile' => true,
'federated_connections_access_tokens' => [
'active' => true
],
'gateway_authentication' => [
'audience' => '<string>',
'method' => '<string>',
'secret' => '<string>',
'secret_base64_encoded' => true,
'subject' => '<string>'
],
'id_token_session_expiry_supported' => true,
'id_token_signed_response_algs' => [
],
'import_mode' => true,
'non_persistent_attrs' => [
'<string>'
],
'passkey_options' => [
'local_enrollment_enabled' => true,
'progressive_enrollment_enabled' => true
],
'password_complexity_options' => [
'min_length' => 64
],
'password_dictionary' => [
'enable' => true,
'dictionary' => [
'<string>'
]
],
'password_history' => [
'enable' => true,
'size' => 12
],
'password_no_personal_info' => [
'enable' => true
],
'password_options' => [
'complexity' => [
'character_types' => [
],
'min_length' => 36
],
'dictionary' => [
'active' => true,
'custom' => [
'<string>'
]
],
'history' => [
'active' => true,
'size' => 12
],
'profile_data' => [
'active' => true,
'blocked_fields' => [
'<string>'
]
]
],
'precedence' => [
],
'set_user_root_attributes' => 'on_each_login',
'upstream_params' => [
],
'validation' => [
'username' => [
'max' => 123,
'min' => 2
]
]
],
'realms' => [
'<string>'
],
'show_as_button' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/connections/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"enabled_clients\": [\n \"<string>\"\n ],\n \"is_domain_connection\": true,\n \"metadata\": {},\n \"options\": {\n \"api_enable_groups\": true,\n \"api_enable_users\": true,\n \"attributes\": {\n \"email\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n },\n \"unique\": true\n },\n \"phone_number\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n }\n },\n \"username\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {},\n \"validation\": {\n \"allowed_types\": {\n \"email\": true,\n \"phone_number\": true\n },\n \"max_length\": 64.5,\n \"min_length\": 64.5\n }\n }\n },\n \"authentication_methods\": {\n \"email_otp\": {\n \"enabled\": true\n },\n \"passkey\": {\n \"enabled\": true\n },\n \"password\": {\n \"enabled\": true\n },\n \"phone_otp\": {\n \"enabled\": true\n }\n },\n \"basic_profile\": true,\n \"configuration\": {},\n \"customScripts\": {\n \"change_email\": \"<string>\",\n \"change_password\": \"<string>\",\n \"change_phone_number\": \"<string>\",\n \"change_username\": \"<string>\",\n \"create\": \"<string>\",\n \"delete\": \"<string>\",\n \"get_user\": \"<string>\",\n \"login\": \"<string>\",\n \"verify\": \"<string>\"\n },\n \"disable_self_service_change_password\": true,\n \"enable_script_context\": true,\n \"enabledDatabaseCustomization\": true,\n \"ext_admin\": true,\n \"ext_agreed_terms\": true,\n \"ext_assigned_plans\": true,\n \"ext_groups\": true,\n \"ext_is_suspended\": true,\n \"ext_profile\": true,\n \"federated_connections_access_tokens\": {\n \"active\": true\n },\n \"gateway_authentication\": {\n \"audience\": \"<string>\",\n \"method\": \"<string>\",\n \"secret\": \"<string>\",\n \"secret_base64_encoded\": true,\n \"subject\": \"<string>\"\n },\n \"id_token_session_expiry_supported\": true,\n \"id_token_signed_response_algs\": [],\n \"import_mode\": true,\n \"non_persistent_attrs\": [\n \"<string>\"\n ],\n \"passkey_options\": {\n \"local_enrollment_enabled\": true,\n \"progressive_enrollment_enabled\": true\n },\n \"password_complexity_options\": {\n \"min_length\": 64\n },\n \"password_dictionary\": {\n \"enable\": true,\n \"dictionary\": [\n \"<string>\"\n ]\n },\n \"password_history\": {\n \"enable\": true,\n \"size\": 12\n },\n \"password_no_personal_info\": {\n \"enable\": true\n },\n \"password_options\": {\n \"complexity\": {\n \"character_types\": [],\n \"min_length\": 36\n },\n \"dictionary\": {\n \"active\": true,\n \"custom\": [\n \"<string>\"\n ]\n },\n \"history\": {\n \"active\": true,\n \"size\": 12\n },\n \"profile_data\": {\n \"active\": true,\n \"blocked_fields\": [\n \"<string>\"\n ]\n }\n },\n \"precedence\": [],\n \"set_user_root_attributes\": \"on_each_login\",\n \"upstream_params\": {},\n \"validation\": {\n \"username\": {\n \"max\": 123,\n \"min\": 2\n }\n }\n },\n \"realms\": [\n \"<string>\"\n ],\n \"show_as_button\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/connections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"enabled_clients\": [\n \"<string>\"\n ],\n \"is_domain_connection\": true,\n \"metadata\": {},\n \"options\": {\n \"api_enable_groups\": true,\n \"api_enable_users\": true,\n \"attributes\": {\n \"email\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n },\n \"unique\": true\n },\n \"phone_number\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {\n \"verification\": {\n \"active\": true\n }\n }\n },\n \"username\": {\n \"identifier\": {\n \"active\": true\n },\n \"profile_required\": true,\n \"signup\": {},\n \"validation\": {\n \"allowed_types\": {\n \"email\": true,\n \"phone_number\": true\n },\n \"max_length\": 64.5,\n \"min_length\": 64.5\n }\n }\n },\n \"authentication_methods\": {\n \"email_otp\": {\n \"enabled\": true\n },\n \"passkey\": {\n \"enabled\": true\n },\n \"password\": {\n \"enabled\": true\n },\n \"phone_otp\": {\n \"enabled\": true\n }\n },\n \"basic_profile\": true,\n \"configuration\": {},\n \"customScripts\": {\n \"change_email\": \"<string>\",\n \"change_password\": \"<string>\",\n \"change_phone_number\": \"<string>\",\n \"change_username\": \"<string>\",\n \"create\": \"<string>\",\n \"delete\": \"<string>\",\n \"get_user\": \"<string>\",\n \"login\": \"<string>\",\n \"verify\": \"<string>\"\n },\n \"disable_self_service_change_password\": true,\n \"enable_script_context\": true,\n \"enabledDatabaseCustomization\": true,\n \"ext_admin\": true,\n \"ext_agreed_terms\": true,\n \"ext_assigned_plans\": true,\n \"ext_groups\": true,\n \"ext_is_suspended\": true,\n \"ext_profile\": true,\n \"federated_connections_access_tokens\": {\n \"active\": true\n },\n \"gateway_authentication\": {\n \"audience\": \"<string>\",\n \"method\": \"<string>\",\n \"secret\": \"<string>\",\n \"secret_base64_encoded\": true,\n \"subject\": \"<string>\"\n },\n \"id_token_session_expiry_supported\": true,\n \"id_token_signed_response_algs\": [],\n \"import_mode\": true,\n \"non_persistent_attrs\": [\n \"<string>\"\n ],\n \"passkey_options\": {\n \"local_enrollment_enabled\": true,\n \"progressive_enrollment_enabled\": true\n },\n \"password_complexity_options\": {\n \"min_length\": 64\n },\n \"password_dictionary\": {\n \"enable\": true,\n \"dictionary\": [\n \"<string>\"\n ]\n },\n \"password_history\": {\n \"enable\": true,\n \"size\": 12\n },\n \"password_no_personal_info\": {\n \"enable\": true\n },\n \"password_options\": {\n \"complexity\": {\n \"character_types\": [],\n \"min_length\": 36\n },\n \"dictionary\": {\n \"active\": true,\n \"custom\": [\n \"<string>\"\n ]\n },\n \"history\": {\n \"active\": true,\n \"size\": 12\n },\n \"profile_data\": {\n \"active\": true,\n \"blocked_fields\": [\n \"<string>\"\n ]\n }\n },\n \"precedence\": [],\n \"set_user_root_attributes\": \"on_each_login\",\n \"upstream_params\": {},\n \"validation\": {\n \"username\": {\n \"max\": 123,\n \"min\": 2\n }\n }\n },\n \"realms\": [\n \"<string>\"\n ],\n \"show_as_button\": true\n}"
response = http.request(request)
puts response.read_body{
"authentication": {
"active": true
},
"connected_accounts": {
"active": true,
"cross_app_access": true
},
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
El id de la conexión que se va a actualizar
Cuerpo
Configure el propósito de una conexión para usarla en la autenticación durante el inicio de sesión.
Show child attributes
Show child attributes
Configure el propósito de una conexión para usarla con cuentas conectadas y Token Vault.
Show child attributes
Show child attributes
El nombre de la conexión usado en la nueva experiencia de Universal Login. Si display_name no se incluye en la solicitud, el campo se sobrescribirá con el valor de name.
128Propiedad OBSOLETA. Use el endpoint PATCH /v2/connections/{id}/clients para habilitar o deshabilitar la conexión para cualquier cliente.
El client_id del cliente para el cual se debe habilitar la conexión
true la promociona a una conexión de nivel de dominio para que las aplicaciones de terceros puedan usarla. false no promociona la conexión, por lo que solo podrán usarla las aplicaciones de primera parte que tengan la conexión habilitada. (El valor predeterminado es false.)
Metadatos asociados a la conexión en forma de objeto con valores de cadena (máx. 255 caracteres). Se permite un máximo de 10 propiedades de metadatos.
Show child attributes
Show child attributes
Las opciones de la conexión (dependen de la estrategia de conexión). Para actualizar estas opciones, debe estar presente el scope update:connections_options. Para verificar los cambios, incluya también el scope read:connections_options. Si no se especifica este scope, no podrá revisar el objeto actualizado.
Show child attributes
Show child attributes
Define los realm para los que se usará la conexión (es decir, dominios de correo electrónico). Si la lista está vacía o no se especifica la propiedad, el nombre de la conexión se agregará como realm.
El realm al que pertenece esta conexión
Habilita la visualización de un botón para la conexión en la página de inicio de sesión (solo en la nueva experiencia). Si es false, solo podrá usarse mediante HRD. (El valor predeterminado es false.)
Respuesta
La conexión se actualizó.
Configure el propósito de una conexión para usarla en la autenticación durante el inicio de sesión.
Show child attributes
Show child attributes
Configure el propósito de una conexión para usarla con cuentas conectadas y Token Vault.
Show child attributes
Show child attributes
Nombre de la conexión usado en la pantalla de inicio de sesión
Propiedad obsoleta. Use el endpoint GET /connections/:id/clients para obtener los ID de los clientes para los que la conexión está habilitada
El ID de cliente
El identificador de la conexión
True si la conexión es de nivel de dominio
Metadatos asociados a la conexión en forma de objeto con valores de cadena (máx. 255 caracteres). Se permite un máximo de 10 propiedades de metadatos.
Show child attributes
Show child attributes
El nombre de la conexión
Para devolver opciones en la respuesta, debe estar presente el scope read:connections_options
Define los realms para los que se usará la conexión (es decir, dominios de correo electrónico). Si el array está vacío o no se especifica la propiedad, el nombre de la conexión se agregará como realm.
El realm al que pertenece esta conexión
Permite mostrar un botón para la conexión en la pantalla de inicio de sesión (solo en la nueva experiencia). Si es false, solo se podrá usar mediante HRD.
El tipo de la conexión, relacionado con el proveedor de identidad