LDAP 用户名密码登录
POST
/api/v2/ldap/verify-user
请求参数
Header 参数
x-authing-app-id
string
APP ID
示例值:
61b239cc3ff574f97dc4379e
x-authing-userpool-id
string
用户池 ID
示例值:
61b239cce059be4e46a4697e
Body 参数application/json
username
string
用户名
password
string
密码,无需加密
withCustomData
string
默认 false
示例
{
"username": "string",
"password": "string",
"withCustomData": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/ldap/verify-user' \
--header 'x-authing-app-id: 61b239cc3ff574f97dc4379e' \
--header 'x-authing-userpool-id: 61b239cce059be4e46a4697e' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "string",
"password": "string",
"withCustomData": "string"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
thirdPartyIdentity
object
必需
id
string
必需
createdAt
string
必需
updatedAt
string
必需
userPoolId
string
必需
isRoot
boolean
必需
status
string
必需
oauth
null
必需
email
null
必需
phone
null
必需
username
string
必需
unionid
null
必需
openid
null
必需
nickname
string
必需
company
null
必需
photo
string
必需
browser
null
必需
device
null
必需
password
string
必需
salt
string
必需
loginsCount
integer
必需
lastIp
string
必需
name
string
必需
givenName
string
必需
familyName
null
必需
middleName
null
必需
profile
null
必需
preferredUsername
null
必需
website
null
必需
gender
string
必需
birthdate
null
必需
zoneinfo
null
必需
locale
null
必需
address
null
必需
formatted
null
必需
streetAddress
null
必需
locality
null
必需
region
null
必需
postalCode
null
必需
city
null
必需
province
null
必需
country
null
必需
registerSource
array[string]
必需
secretInfo
null
必需
emailVerified
boolean
必需
phoneVerified
boolean
必需
lastLogin
string
必需
blocked
boolean
必需
isDeleted
boolean
必需
sendSmsCount
integer
必需
sendSmsLimitCount
integer
必需
encryptedPassword
string
必需
signedUp
string
必需
externalId
string
必需
mainDepartmentId
null
必需
mainDepartmentCode
null
必需
lastMfaTime
null
必需
passwordSecurityLevel
integer
必需
resetPasswordOnFirstLogin
boolean
必需
syncExtInfo
null
必需
phoneCountryCode
null
必需
lastIP
string
必需
token
string
必需
tokenExpiredAt
string
必需
_id
string
必需
registerMethod
string
必需
registerInClient
string
必需
decryptedToken
object
必需
identities
array [object {16}]
必需
示例
{
"code": 200,
"message": "登录成功",
"data": {
"thirdPartyIdentity": {
"provider": null,
"refreshToken": null,
"accessToken": null,
"scope": null,
"expiresIn": null,
"updatedAt": null
},
"id": "61b23a5848b63c6d9d3fe621",
"createdAt": "2021-12-09T17:18:16.734Z",
"updatedAt": "2022-01-18T09:00:00.604Z",
"userPoolId": "61b239cce059be4e46a4697e",
"isRoot": false,
"status": "Activated",
"oauth": null,
"email": null,
"phone": null,
"username": "a3",
"unionid": null,
"openid": null,
"nickname": "a3",
"company": null,
"photo": "https://files.authing.co/authing-console/default-user-avatar.png",
"browser": null,
"device": null,
"password": "6b586550f39b9af70709760948271857",
"salt": "aibbb6a2265",
"loginsCount": 4,
"lastIp": "124.64.124.198",
"name": "a3",
"givenName": "a3",
"familyName": null,
"middleName": null,
"profile": null,
"preferredUsername": null,
"website": null,
"gender": "U",
"birthdate": null,
"zoneinfo": null,
"locale": null,
"address": null,
"formatted": null,
"streetAddress": null,
"locality": null,
"region": null,
"postalCode": null,
"city": null,
"province": null,
"country": null,
"registerSource": [
"unknown"
],
"secretInfo": null,
"emailVerified": false,
"phoneVerified": false,
"lastLogin": "2022-01-18T09:00:00.557Z",
"blocked": false,
"isDeleted": false,
"sendSmsCount": 0,
"sendSmsLimitCount": 1000,
"encryptedPassword": "XsNfAZieiJ2AEaIqX0DAbkOrPw7I0P66zhMVphQbUxr+08wVvaXNyPnckpcAxsBhnErAewrBpXAAZ6+29VTnzUKbgMnIQN4WP3CyMsQzEtc5Ku9hsvWJjAkBJdsM0TRQ55/YYKN2IGi7p0xu8DEAGHK5b7CTWX90YjUfqGLg9hc=",
"signedUp": "2021-12-09T17:18:16.734Z",
"externalId": "CN=a3,CN=IDT,CN=Steamory,CN=Users,DC=authing,DC=test",
"mainDepartmentId": null,
"mainDepartmentCode": null,
"lastMfaTime": null,
"passwordSecurityLevel": 2,
"resetPasswordOnFirstLogin": false,
"syncExtInfo": null,
"phoneCountryCode": null,
"lastIP": "124.64.124.198",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cGRhdGVkX2F0IjoiMjAyMi0wMS0xOFQwODo1ODowNi40MzVaIiwiYWRkcmVzcyI6eyJjb3VudHJ5IjpudWxsLCJwb3N0YWxfY29kZSI6bnVsbCwicmVnaW9uIjpudWxsLCJmb3JtYXR0ZWQiOm51bGx9LCJwaG9uZV9udW1iZXJfdmVyaWZpZWQiOmZhbHNlLCJwaG9uZV9udW1iZXIiOm51bGwsImxvY2FsZSI6bnVsbCwiem9uZWluZm8iOm51bGwsImJpcnRoZGF0ZSI6bnVsbCwiZ2VuZGVyIjoiVSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZW1haWwiOm51bGwsIndlYnNpdGUiOm51bGwsInBpY3R1cmUiOiJodHRwczovL2ZpbGVzLmF1dGhpbmcuY28vYXV0aGluZy1jb25zb2xlL2RlZmF1bHQtdXNlci1hdmF0YXIucG5nIiwicHJvZmlsZSI6bnVsbCwicHJlZmVycmVkX3VzZXJuYW1lIjpudWxsLCJuaWNrbmFtZSI6ImEzIiwibWlkZGxlX25hbWUiOm51bGwsImZhbWlseV9uYW1lIjpudWxsLCJnaXZlbl9uYW1lIjoiYTMiLCJuYW1lIjoiYTMiLCJzdWIiOiI2MWIyM2E1ODQ4YjYzYzZkOWQzZmU2MjEiLCJleHRlcm5hbF9pZCI6IkNOPWEzLENOPUlEVCxDTj1TdGVhbW9yeSxDTj1Vc2VycyxEQz1hdXRoaW5nLERDPXRlc3QiLCJ1bmlvbmlkIjpudWxsLCJ1c2VybmFtZSI6ImEzIiwiZGF0YSI6eyJ0eXBlIjoidXNlciIsInVzZXJQb29sSWQiOiI2MWIyMzljY2UwNTliZTRlNDZhNDY5N2UiLCJhcHBJZCI6IjYxYjIzOWNjM2ZmNTc0Zjk3ZGM0Mzc5ZSIsImlkIjoiNjFiMjNhNTg0OGI2M2M2ZDlkM2ZlNjIxIiwidXNlcklkIjoiNjFiMjNhNTg0OGI2M2M2ZDlkM2ZlNjIxIiwiX2lkIjoiNjFiMjNhNTg0OGI2M2M2ZDlkM2ZlNjIxIiwicGhvbmUiOm51bGwsImVtYWlsIjpudWxsLCJ1c2VybmFtZSI6ImEzIiwidW5pb25pZCI6bnVsbCwib3BlbmlkIjpudWxsLCJjbGllbnRJZCI6IjYxYjIzOWNjZTA1OWJlNGU0NmE0Njk3ZSJ9LCJ1c2VycG9vbF9pZCI6IjYxYjIzOWNjZTA1OWJlNGU0NmE0Njk3ZSIsImF1ZCI6IjYxYjIzOWNjM2ZmNTc0Zjk3ZGM0Mzc5ZSIsImV4cCI6MTY0MzcwNjAwMCwiaWF0IjoxNjQyNDk2NDAwLCJpc3MiOiJodHRwczovL2VhbmUzbS1kZW1vLmF1dGhpbmcuY24vb2lkYyJ9.o87BuAWRo3OR5skr3VP6FLRhGsNd-k-rhKsvFgDr1SA",
"tokenExpiredAt": "2022-02-01T09:00:00.546Z",
"_id": "61b23a5848b63c6d9d3fe621",
"registerMethod": "unknown",
"registerInClient": "61b239cce059be4e46a4697e",
"decryptedToken": {
"type": "user",
"userPoolId": "61b239cce059be4e46a4697e",
"appId": "61b239cc3ff574f97dc4379e",
"id": "61b23a5848b63c6d9d3fe621",
"userId": "61b23a5848b63c6d9d3fe621",
"_id": "61b23a5848b63c6d9d3fe621",
"phone": null,
"email": null,
"username": "a3",
"unionid": null,
"openid": null,
"clientId": "61b239cce059be4e46a4697e"
},
"identities": [
{
"id": "61b23a5831bc47489ab57315",
"createdAt": "2021-12-09T17:18:16.780Z",
"updatedAt": "2021-12-09T17:18:16.780Z",
"userPoolId": "61b239cce059be4e46a4697e",
"provider": "ad",
"isSocial": false,
"extIdpId": "61b239fc9a11b153654e27c5",
"userId": "61b23a5848b63c6d9d3fe621",
"origianlProfile": null,
"userIdInIdp": "9da6a569-7361-48cb-8b8c-b074393ed845",
"type": "generic",
"userInfoInIdp": {
"email": "a3@authing.test",
"username": "a3",
"givenName": "a3",
"name": "a3",
"nickname": "a3"
},
"openid": null,
"accessToken": null,
"refreshToken": null,
"syncIdentityProviderId": "362"
}
]
}
}
修改于 2022-01-18 09:43:40