Update README.md

pull/5/head
skiffer-git 3 years ago committed by GitHub
parent cb3e9a16b9
commit 9ffa8ca0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,98 +144,6 @@ All images are available at https://hub.docker.com/r/lyt1123/open_im_server
- start_all.sh&&stop_all.sh - start_all.sh&&stop_all.sh
- Total script, start all services and close all services - Total script, start all services and close all services
### Server-side authentication api graphic explanation of the login authentication process
- **User Register**
- **Request URL**
```
http://x.x.x.x:10000/auth/user_register
```
- **Request method**
```
POST
```
- **Parameter**
| parameter name | required | Type | Description |
| -------------- | -------- | ------ | ------------------------------------------------------------ |
| secret | Y | string | The secret key used by the app server to connect to the sdk server. The maximum length is 32 characters. It must be ensured that the secret keys of the app server and the sdk server are the same. There is a risk of secret leakage, and it is best to save it on the user server. |
| platform | Y | int | Platform type iOS 1, Android 2, Windows 3, OSX 4, WEB 5, applet 6, linux 7 |
| uid | Y | string | User ID, with a maximum length of 64 characters, must be unique within an APP |
| name | Y | string | User nickname, the maximum length is 64 characters, can be set as an empty string |
| icon | N | string | User avatar, the maximum length is 1024 bytes, can be set as an empty string |
| gender | N | int | User gender, 0 means unknown, 1 means male, 2 female means female, others will report parameter errors |
| mobile | N | string | User mobile, the maximum length is 32 characters, non-Mainland China mobile phone numbers need to fill in the country code (such as the United States: +1-xxxxxxxxxx) or the area code (such as Hong Kong: +852-xxxxxxxx), which can be set as an empty string |
| birth | N | string | The birthday of the user, the maximum length is 16 characters, can be set as an empty string |
| email | N | string | User email, the maximum length is 64 characters, can be set as an empty string |
| ex | N | string | User business card extension field, the maximum length is 1024 characters, users can extend it by themselves, it is recommended to encapsulate it into a JSON string, or set it to an empty string |
- **Return Parameter**
```
{
"errCode": 0,
"errMsg": "",
"data":{
"uid": "",
"token": "",
"expiredTime": 0,
}
}
```
- **Refresh Token**
- **Request URL**
```
http://x.x.x.x:10000/auth/user_token
```
- **Request method**
```
POST
```
- **Parameter**
| parameter name | required | Type | Description |
| -------------- | -------- | ------ | ------------------------------------------------------------ |
| secret | Y | string | The secret key used by the app server to connect to the sdk server. The maximum length is 32 characters. It must be ensured that the secret keys of the app server and the sdk server are the same. There is a risk of secret leakage, and it is best to save it on the user server. |
| platform | Y | int | Platform type iOS 1, Android 2, Windows 3, OSX 4, WEB 5, applet 6, linux 7 |
| uid | Y | string | User ID, with a maximum length of 64 characters, must be unique within an APP |
- **Return Parameter**
```
{
"errCode": 0,
"errMsg": "",
"data":{
"uid": "",
"token": "",
"expiredTime": 0,
}
}
```
- **API call description**
```
appapp client
app-serverapp server
open-im-sdkopen-im source sdk
open-im-serveropen-im source sdk service
```
- **Authentication Clow Chart** - **Authentication Clow Chart**
![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png) ![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png)

Loading…
Cancel
Save