开启或关闭白名单
测试中
PUT
/api/v2/whitelist
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
Body 参数application/json
input
object
必需
whitelist
object
必需
示例
{
"input": {
"whitelist": {
"phoneEnabled": true,
"emailEnabled": true,
"usernameEnabled": true
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://core.authing.cn/api/v2/whitelist' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 61b95d6c96d42670da568408' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
frequentRegisterCheck
object
必需
loginFailCheck
object
必需
loginPasswordFailCheck
object
必需
passwordUpdatePolicy
object
必需
changePhoneStrategy
object
必需
changeEmailStrategy
object
必需
qrcodeLoginStrategy
object
必需
app2WxappLoginStrategy
object
必需
id
string
必需
createdAt
string
必需
updatedAt
string
必需
isRoot
boolean
必需
userId
string
必需
logo
string
必需
name
string
必需
domain
string
必需
secret
string
必需
appSsoEnabled
boolean
必需
allowedOrigins
string
必需
emailVerifiedDefault
boolean
必需
sendWelcomeEmail
boolean
必需
registerDisabled
boolean
必需
loginRequireEmailVerified
boolean
必需
description
string
必需
jwtSecret
string
必需
tokenExpiresAfter
integer
必需
isDeleted
boolean
必需
loginFailStrategy
string
必需
userpoolTypes
null
必需
passwordStrength
integer
必需
packageType
integer
必需
defaultNamespaceId
integer
必需
systemNamespaceId
integer
必需
verifyCodeLength
integer
必需
userPoolType
string
必需
internationalSmsConfig
null
必需
customPasswordStrength
object
必需
passwordFaas
object
必需
whitelist
object
必需
customSMSProvider
object
必需
customDb
object
必需
示例
{
"code": 200,
"message": "更新成功",
"data": {
"frequentRegisterCheck": {
"timeInterval": 300,
"limit": 50,
"enabled": false
},
"loginFailCheck": {
"timeInterval": 300,
"limit": 50,
"enabled": false
},
"loginPasswordFailCheck": {
"timeInterval": 300,
"limit": 50,
"enabled": false
},
"passwordUpdatePolicy": {
"enabled": false,
"forcedCycle": null,
"differenceCycle": null
},
"changePhoneStrategy": {
"verifyOldPhone": true
},
"changeEmailStrategy": {
"verifyOldEmail": true
},
"qrcodeLoginStrategy": {
"qrcodeExpiresAfter": 120,
"ticketExpiresAfter": 300,
"returnFullUserInfo": false,
"allowExchangeUserInfoFromBrowser": true
},
"app2WxappLoginStrategy": {
"ticketExpiresAfter": 120,
"ticketExchangeUserInfoNeedSecret": false
},
"id": "61b95d6c96d42670da568408",
"createdAt": "2021-12-15T03:13:48.217Z",
"updatedAt": "2021-12-15T03:13:48.217Z",
"isRoot": false,
"userId": "61b95d5ea14b5c8b6a7b76e3",
"logo": "https://files.authing.co/authing-console/login_logo.svg",
"name": "我的第一个用户池",
"domain": "edb8q5",
"secret": "07a76023400836c22bc1a1c57e8aab4c",
"appSsoEnabled": false,
"allowedOrigins": "",
"emailVerifiedDefault": false,
"sendWelcomeEmail": true,
"registerDisabled": false,
"loginRequireEmailVerified": false,
"description": "",
"jwtSecret": "466e81f22cdc861526d3a18d900d5ae0",
"tokenExpiresAfter": 1296000,
"isDeleted": false,
"loginFailStrategy": "captcha",
"userpoolTypes": null,
"passwordStrength": 0,
"packageType": -1,
"defaultNamespaceId": 5,
"systemNamespaceId": 4,
"verifyCodeLength": 4,
"userPoolType": "B2B",
"internationalSmsConfig": null,
"customPasswordStrength": {
"enabled": false,
"regex": null,
"message": null
},
"passwordFaas": {
"enabled": false,
"encryptUrl": null,
"decryptUrl": null,
"validateUrl": null
},
"whitelist": {
"phoneEnabled": true,
"emailEnabled": true,
"usernameEnabled": false
},
"customSMSProvider": {
"enabled": false,
"provider": null,
"config": null
},
"customDb": {
"cahceConfig": null,
"loggingConfig": null,
"enabled": false,
"mode": null,
"connection": null,
"scripts": []
}
}
}
修改于 2022-01-24 05:40:49