Passport/pkg/grpc/proto/auth.proto
2024-02-21 20:40:39 +08:00

30 lines
532 B
Protocol Buffer

syntax = "proto3";
option go_package = ".;proto";
package proto;
service Auth {
rpc Authenticate(AuthRequest) returns (AuthReply) {}
}
message Userinfo {
uint64 id = 1;
string name = 2;
string nick = 3;
string email = 4;
string avatar = 5;
optional string description = 6;
}
message AuthRequest {
string access_token = 1;
optional string refresh_token = 2;
}
message AuthReply {
bool is_valid = 1;
optional string access_token = 2;
optional string refresh_token = 3;
optional Userinfo userinfo = 4;
}