You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

54 lines
966 B

syntax = "proto3";
//import "google/protobuf/empty.proto";
//import "google/protobuf/wrappers.proto";
//import "google/protobuf/type.proto";
option go_package = "./auth";
service AuthService {
// account password login
rpc Login(ReqLogin) returns(ResLogin);
// verify token validate
rpc Verify(ReqVerify) returns (Subject);
// registry
rpc Registry(ReqRegistry) returns (Subject);
// uid registry info
rpc FindByUid(ReqFindByUid) returns(Subject);
}
message Subject {
string uid = 1;
string username = 2;
int64 time = 3; // ms
map<string, string> extra = 4;
}
message ReqLogin {
string account = 2;
string password = 3;
}
message ResLogin {
string token = 2;
// string refreshToken = 3;
Subject subject = 7;
}
message ReqVerify {
string token = 2;
}
message ReqRegistry {
string account = 1;
string username = 2;
string password = 3;
map<string, string> extra = 4;
}
message ReqFindByUid {
string uid = 1;
}