refactor: mp.auth
This commit is contained in:
39
proto/clientapi/credential/credential.proto
Normal file
39
proto/clientapi/credential/credential.proto
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user