beteran-protobuf/proto/ss/identity.proto
2022-08-15 06:31:24 +00:00

100 lines
2.1 KiB
Protocol Buffer

syntax = "proto3";
package bet.beteran.ss.identity;
import "models/core/network.proto";
import "protobuf/rpc.proto";
import "models/member.proto";
// subject = bet.beteran.ss.identity.CheckUsernameForDuplication;
message CheckUsernameForDuplicationRequest {
message Request {
string username = 1;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message CheckUsernameForDuplicationResponse {
message Result {
bool duplicated = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.identity.CheckNicknameForDuplication;
message CheckNicknameForDuplicationRequest {
message Request {
string nickname = 1;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message CheckNicknameForDuplicationResponse {
message Result {
bool duplicated = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.identity.Captcha
message CaptchaRequest {
message Request {
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message CaptchaResponse {
message Result {
string security_code_hash = 1;
string image = 2;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss.identity.Signin
message SigninRequest {
message Request {
string security_code_hash = 1;
string security_code = 2;
string username = 3;
string password = 4;
}
bet.beteran.core.network.Client client = 1;
Request request = 2;
}
message SigninResponse {
message Result {
string access_token = 1;
}
optional bet.protobuf.rpc.Error error = 1;
optional Result result = 2;
}
// subject = bet.beteran.ss_event.identity.AfterSignin
message AfterSigninEvent {
message Event {
bet.beteran.member.Member member = 1;
}
bet.beteran.core.network.Client client = 1;
Event event = 2;
}
// subject = bet.beteran.ss_event.identity.AfterSignout
message AfterSignoutEvent {
message Event {
bet.beteran.member.Member member = 1;
}
bet.beteran.core.network.Client client = 1;
Event event = 2;
}