# Authentication Management
# Check Username Authentication Information
# URI
GET /auth_username
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | All authentication data |
data[].username | String | Login Username |
meta | Object | Paging information |
meta.page | Integer | Page number |
meta.limit | Integer | Number of data items displayed per page |
meta.count | Integer | Total number of data |
# Request Example
curl -u app_id:app_secret -X GET {api}/auth_username
1
# Response Example
{
"meta": {
"page": 1,
"limit": 10,
"count": 3
},
"data": [
{
"username": "api_user2"
},
{
"username": "api_user1"
},
{
"username": "test"
}
],
"code": 0
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Check the Authentication Information for the specified username
# URI
GET /auth_username/{username}
# Parameter
Name | Type | Description |
---|---|---|
username | String | username |
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | All authentication data |
data[].username | String | Login Username |
data[].password | String | Use sha256 encrypted password |
# Request Example
curl -u app_id:app_secret -X GET {api}/auth_username/user1
1
# Response Example
```JSON
{
"data": {
"username": "user1"
},
"code": 0
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Create Username Authentication Information
# URI
POST /auth_username
# Request Message
Name | Type | Description |
---|---|---|
username | String | Authenticated username |
password | String | Authenticated password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X POST -d '{"username": "user_test", "password": "password"}' {api}/auth_username
1
{
"code": 0
}
1
2
3
2
3
# Response Example
{
"code": 0
}
1
2
3
2
3
# Batch Create Username Authentication Information
# URI
POST /auth_username
# Request Message
Name | Type | Description |
---|---|---|
[].username | String | Authenticated username |
[].password | String | Authenticated password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | Create result, key means username, value means request result, ok means create successfully |
# Request Example
curl -u app_id:app_secret -X POST -d '[{"username": "api_user1", "password": "password"},{"username": "api_user2", "password": "password"}]' {api}/auth_username
1
# Response Example
{
"data": {
"api_user1": "ok",
"api_user2": "ok"
},
"code": 0
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Update the Username Authentication Password
# URI
PUT /auth_username/{username}
# Parameter
Name | Type | Description |
---|---|---|
username | String | Updated username |
# Request Message
Name | Type | Description |
---|---|---|
password | String | Authentication password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X PUT -d '{"password": "new_password"}' {api}/auth_username/api_user1
1
# Response Example
{
"code": 0
}
1
2
3
2
3
# Delete Username Authentication Information
# URI
DELETE /auth_username/{username}
# Parameter
Name | Type | Description |
---|---|---|
username | String | Deleted username |
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X DELETE {api}/auth_username/api_user1
1
# Response Example
{
"code": 0
}
1
2
3
2
3
# Check Client Authentication Information
# URI
GET /auth_clientid
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | All authentication data |
data[].clientid | String | Login Clientid |
meta | Object | Paging information |
meta.page | Integer | Page number |
meta.limit | Integer | Number of data items displayed per page |
meta.count | Integer | Total number of data |
# Request Example
curl -u app_id:app_secret -X GET {api}/auth_clientid
1
# Response Example
{
"meta": {
"page": 1,
"limit": 10,
"count": 3
},
"data": [
{
"clientid": "api_user2"
},
{
"clientid": "api_user1"
},
{
"clientid": "test"
}
],
"code": 0
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Check the Authentication Information for the specified username
# URI
GET /auth_clientid/{clientid}
# Parameter
Name | Type | Description |
---|---|---|
clientid | String | clientid |
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | All authentication data |
data[].clientid | String | clientid |
# Request Example
curl -u app_id:app_secret -X GET {api}/auth_clientid/clientid_1
1
# Response Example
{
"data": {
"clientid": "clientid_1"
},
"code": 0
}
1
2
3
4
5
6
2
3
4
5
6
# Create Client Authentication Information
# URI
POST /auth_clientid
# Request Message
Name | Type | Description |
---|---|---|
clientid | String | Authenticated clientid |
password | String | Authenticated password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X POST -d '{"clientid": "test", "password": "password"}' {api}/auth_clientid
1
# Response Example
{
"code": 0
}
1
2
3
2
3
# Batch Create Client Authentication Information
# URI
POST /auth_clientid
# Request Message
Name | Type | Description |
---|---|---|
[].clientid | String | Authenticated clientid |
[].password | String | Authenticated password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
data | Array of Objects | Create result, key means clientid, value means request result, ok means create successfully |
# Request Example
curl -u app_id:app_secret -X POST -d '[{"clientid": "test1", "password": "password"},{"clientid": "test2", "password": "password"}]' {api}/auth_clientid
1
# Response Example
{
"data": {
"test1": "ok",
"test2": "ok"
},
"code": 0
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Update the Client Authentication Password
# URI
PUT /auth_clientid/{clientid}
# Parameter
Name | Type | Description |
---|---|---|
clientid | String | Updated clientid |
# Request Message
Name | Type | Description |
---|---|---|
password | String | Authentication password |
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X PUT -d '{"password": "new_password"}' {api}/auth_clientid/test1
1
# Response Example
{
"code": 0
}
1
2
3
2
3
# Delete Client Authentication Information
# URI
DELETE /auth_clientid/{clientid}
# Parameter
Name | Type | Description |
---|---|---|
clientid | String | Deleted clientid |
# Request Message
None.
# Response Message
Name | Type | Description |
---|---|---|
code | Integer | 0 |
# Request Example
curl -u app_id:app_secret -X DELETE {api}/auth_clientid/test1
1
# Response Example
{
"code": 0
}
1
2
3
2
3
What’s on this page
- Check Username Authentication Information
- Check the Authentication Information for the specified username
- Create Username Authentication Information
- Batch Create Username Authentication Information
- Update the Username Authentication Password
- Delete Username Authentication Information
- Check Client Authentication Information
- Check the Authentication Information for the specified username
- Create Client Authentication Information
- Batch Create Client Authentication Information
- Update the Client Authentication Password
- Delete Client Authentication Information