Passport/pkg/grpc/proto/auth.proto

44 lines
818 B
Protocol Buffer
Raw Normal View History

2024-02-20 13:46:15 +00:00
syntax = "proto3";
option go_package = ".;proto";
package proto;
service Auth {
rpc Authenticate(AuthRequest) returns (AuthReply) {}
rpc CheckPerm(CheckPermRequest) returns (CheckPermReply) {}
2024-02-20 13:46:15 +00:00
}
message Userinfo {
2024-02-21 12:40:39 +00:00
uint64 id = 1;
string name = 2;
string nick = 3;
string email = 4;
string avatar = 5;
2024-03-20 12:56:07 +00:00
string banner = 6;
optional string description = 7;
2024-02-20 13:46:15 +00:00
}
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;
2024-05-17 09:13:11 +00:00
optional bytes permissions = 5;
optional uint64 ticket_id = 6;
}
message CheckPermRequest {
string token = 1;
string key = 2;
bytes value = 3;
}
message CheckPermReply {
bool is_valid = 1;
2024-02-20 13:46:15 +00:00
}