This commit is contained in:
huangsimin@fusen.cn 2023-12-07 15:52:05 +08:00
parent 6605238003
commit 998783d1d6
2 changed files with 15 additions and 18 deletions

View File

@ -1,17 +1,8 @@
package test
import (
"bytes"
"encoding/json"
"fmt"
"{{.ProjectName}}/server/config"
"fusen-basic/env"
"fusen-basic/utils/log"
"net/http"
"net/url"
"reflect"
"strings"
"time"
)
var fusen *env.Fusen[config.Config]

View File

@ -14,13 +14,7 @@ import "google/protobuf/any.proto";
service auth {
//
rpc ValidToken(ValidTokenRequest) returns (ValidTokenResponse) {
// HTTP POST
option (google.api.http) = {
post: "/api/auth/valid/token"
body: "*"
};
}
rpc ValidToken(ValidTokenRequest) returns (ValidTokenResponse) {}
//
rpc Login(UserLoginRequest) returns (UserLoginResponse) {
@ -121,6 +115,19 @@ service auth {
}
message Debug {
int64 exp = 1;
int64 is_cache = 2;
int64 is_all_template_tag = 3;
}
message UserInfo {
int64 user_id = 1;
int64 guest_id = 2;
int64 exp = 3;
Debug debug = 4;
}
// token的请求
message ValidTokenRequest {
optional string user_token = 1;
@ -130,8 +137,7 @@ message ValidTokenRequest {
// token的请求
message ValidTokenResponse {
google.protobuf.Struct user_info = 1;
google.protobuf.Struct debug_info = 2;
UserInfo user_info = 1;
}