This commit is contained in:
eson
2023-07-27 16:48:43 +08:00
parent abc315a39b
commit 0ce35645b2
10 changed files with 195 additions and 112 deletions

View File

@@ -12,16 +12,16 @@ import "basic.api"
service auth {
@handler UserLoginHandler
post /api/auth/login(RequestUserLogin) returns (response);
@handler AcceptCookieHandler
post /api/auth/accept-cookie(request) returns (response);
@handler UserGoogleLoginHandler
get /api/auth/oauth2/login/google(RequestGoogleLogin) returns (response);
@handler UserEmailConfirmationHandler
get /api/auth/email/confirmation(RequestEmailConfirmation) returns (response);
@handler UserEmailRegisterHandler
get /api/auth/oauth2/register(RequestEmailRegister) returns (response);
}
@@ -40,12 +40,13 @@ type RequestGoogleLogin {
}
type RequestEmailConfirmation {
Email string `json:"email"` // 要确认的email
Token string `json:"token"` // 操作Token
Token string `query:"token"` // 操作Token
}
type RequestEmailRegister {
Email string `json:"email"`
WCId uint64 `json:"wcid"`
GuestId uint64 `json:"guest_id"`
RegisterToken string `json:"register_token"`
}