first commit
This commit is contained in:
32
app/main/api/desc/admin/auth.api
Normal file
32
app/main/api/desc/admin/auth.api
Normal file
@@ -0,0 +1,32 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "认证中心服务"
|
||||
desc: "认证中心服务"
|
||||
version: "v1"
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/admin/auth
|
||||
group: admin_auth
|
||||
)
|
||||
service main {
|
||||
@doc "登录"
|
||||
@handler AdminLogin
|
||||
post /login (AdminLoginReq) returns (AdminLoginResp)
|
||||
|
||||
}
|
||||
|
||||
type (
|
||||
AdminLoginReq {
|
||||
Username string `json:"username" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Captcha bool `json:"captcha" validate:"required"`
|
||||
}
|
||||
AdminLoginResp {
|
||||
AccessToken string `json:"access_token"`
|
||||
AccessExpire int64 `json:"access_expire"`
|
||||
RefreshAfter int64 `json:"refresh_after"`
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user