client/docs/passport/login.md

84 lines
1.5 KiB
Markdown

# Login
Passport-通行证模块-登录
- [/passport.Login/Pwd](#passportloginpwd)
- [/passport.Login/Code](#passportlogincode)
- [/passport.Login/CodeAndRegister](#passportlogincodeandregister)
## /passport.Login/Pwd
通过密码登录
### Request
```javascript
{
account: "", // type<string>, 账号 必填
password: "", // type<string>, 密码 必填
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```
## /passport.Login/Code
通过验证码登录
### Request
```javascript
{
country: "", // type<string>, 国家
phone: "", // type<string>, 手机号码
code: "", // type<string>, 验证码
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```
## /passport.Login/CodeAndRegister
通过验证码登录并注册
### Request
```javascript
{
country: "", // type<string>, 国家
phone: "", // type<string>, 手机号码
code: "", // type<string>, 验证码
}
```
### Reply
```javascript
{
id: "0", // type<int64>
identity: "", // type<string>, 用户唯一码
token: "", // type<string>, 用户凭证
extend: {
"": ""
}, // map<string,string>, 扩展字段
}
```