refactor: mp.auth

This commit is contained in:
lab
2021-11-10 01:44:51 +08:00
parent 408a941ccf
commit 155875d2ce
38 changed files with 7542 additions and 20 deletions

View File

@@ -0,0 +1,39 @@
syntax = "proto3";
package esin.io.weixin;
option go_package = "git.esin.io/weixin/protobuf/credential;credential";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
service CredentialService {
rpc GetCredential(google.protobuf.Empty) returns (GetCredentialResponse) {
option (google.api.http) = {
get: "/token"
};
}
rpc RenewCredential(google.protobuf.Empty) returns (RenewCredentialResponse) {
option (google.api.http) = {
post: "/token"
body: "*"
};
}
}
message Credential {
string access_token = 1;
int32 expires_in = 2;
}
message GetCredentialResponse {
Credential credential = 1;
google.protobuf.Timestamp timestamp = 2;
}
message RenewCredentialResponse {
Credential credential = 1;
google.protobuf.Timestamp timestamp = 2;
}