chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -25,6 +25,8 @@ type LoginRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
DeviceId string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // Уникальный идентификатор устройства клиента
|
||||
PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Публичный ключ устройства для шифрования сообщений
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -73,6 +75,20 @@ func (x *LoginRequest) GetPassword() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetDeviceId() string {
|
||||
if x != nil {
|
||||
return x.DeviceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginRequest) GetPublicKey() string {
|
||||
if x != nil {
|
||||
return x.PublicKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
||||
@@ -419,6 +435,7 @@ type VerifyTokenResponse struct {
|
||||
Permissions []string `protobuf:"bytes,6,rep,name=permissions,proto3" json:"permissions,omitempty"`
|
||||
SessionId *string `protobuf:"bytes,7,opt,name=session_id,json=sessionId,proto3,oneof" json:"session_id,omitempty"`
|
||||
RequiresPin *bool `protobuf:"varint,8,opt,name=requires_pin,json=requiresPin,proto3,oneof" json:"requires_pin,omitempty"`
|
||||
DeviceId *string `protobuf:"bytes,9,opt,name=device_id,json=deviceId,proto3,oneof" json:"device_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -509,6 +526,13 @@ func (x *VerifyTokenResponse) GetRequiresPin() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *VerifyTokenResponse) GetDeviceId() string {
|
||||
if x != nil && x.DeviceId != nil {
|
||||
return *x.DeviceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetAccountRoleLevelRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
@@ -664,6 +688,7 @@ type SessionItem struct {
|
||||
UserAgent string `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
|
||||
LastActivity int64 `protobuf:"varint,4,opt,name=last_activity,json=lastActivity,proto3" json:"last_activity,omitempty"` // Unix timestamp в миллисекундах
|
||||
IsCurrent bool `protobuf:"varint,5,opt,name=is_current,json=isCurrent,proto3" json:"is_current,omitempty"` // Флаг текущей сессии
|
||||
DeviceId string `protobuf:"bytes,6,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -733,6 +758,13 @@ func (x *SessionItem) GetIsCurrent() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *SessionItem) GetDeviceId() string {
|
||||
if x != nil {
|
||||
return x.DeviceId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetSessionsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Sessions []*SessionItem `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
@@ -1469,10 +1501,13 @@ var File_sso_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_sso_auth_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0esso/auth.proto\x12\aauth.v1\"F\n" +
|
||||
"\x0esso/auth.proto\x12\aauth.v1\"\x82\x01\n" +
|
||||
"\fLoginRequest\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"\x9a\x02\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x1b\n" +
|
||||
"\tdevice_id\x18\x03 \x01(\tR\bdeviceId\x12\x1d\n" +
|
||||
"\n" +
|
||||
"public_key\x18\x04 \x01(\tR\tpublicKey\"\x9a\x02\n" +
|
||||
"\rLoginResponse\x12!\n" +
|
||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" +
|
||||
"\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\x12\x16\n" +
|
||||
@@ -1500,7 +1535,7 @@ const file_sso_auth_proto_rawDesc = "" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\"*\n" +
|
||||
"\x12VerifyTokenRequest\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"\xf7\x02\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"\xa7\x03\n" +
|
||||
"\x13VerifyTokenResponse\x12\x19\n" +
|
||||
"\bis_valid\x18\x01 \x01(\bR\aisValid\x12(\n" +
|
||||
"\rerror_message\x18\x02 \x01(\tH\x00R\ferrorMessage\x88\x01\x01\x12\x13\n" +
|
||||
@@ -1511,13 +1546,16 @@ const file_sso_auth_proto_rawDesc = "" +
|
||||
"\vpermissions\x18\x06 \x03(\tR\vpermissions\x12\"\n" +
|
||||
"\n" +
|
||||
"session_id\x18\a \x01(\tH\x04R\tsessionId\x88\x01\x01\x12&\n" +
|
||||
"\frequires_pin\x18\b \x01(\bH\x05R\vrequiresPin\x88\x01\x01B\x10\n" +
|
||||
"\frequires_pin\x18\b \x01(\bH\x05R\vrequiresPin\x88\x01\x01\x12 \n" +
|
||||
"\tdevice_id\x18\t \x01(\tH\x06R\bdeviceId\x88\x01\x01B\x10\n" +
|
||||
"\x0e_error_messageB\x05\n" +
|
||||
"\x03_idB\v\n" +
|
||||
"\t_usernameB\r\n" +
|
||||
"\v_role_levelB\r\n" +
|
||||
"\v_session_idB\x0f\n" +
|
||||
"\r_requires_pin\";\n" +
|
||||
"\r_requires_pinB\f\n" +
|
||||
"\n" +
|
||||
"_device_id\";\n" +
|
||||
"\x1aGetAccountRoleLevelRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"account_id\x18\x01 \x01(\tR\taccountId\"R\n" +
|
||||
@@ -1527,7 +1565,7 @@ const file_sso_auth_proto_rawDesc = "" +
|
||||
"role_level\x18\x02 \x01(\x05R\troleLevel\"Z\n" +
|
||||
"\x11GetSessionRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12,\n" +
|
||||
"\x12current_session_id\x18\x02 \x01(\tR\x10currentSessionId\"\x9f\x01\n" +
|
||||
"\x12current_session_id\x18\x02 \x01(\tR\x10currentSessionId\"\xbc\x01\n" +
|
||||
"\vSessionItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
|
||||
"\n" +
|
||||
@@ -1536,7 +1574,8 @@ const file_sso_auth_proto_rawDesc = "" +
|
||||
"user_agent\x18\x03 \x01(\tR\tuserAgent\x12#\n" +
|
||||
"\rlast_activity\x18\x04 \x01(\x03R\flastActivity\x12\x1d\n" +
|
||||
"\n" +
|
||||
"is_current\x18\x05 \x01(\bR\tisCurrent\"G\n" +
|
||||
"is_current\x18\x05 \x01(\bR\tisCurrent\x12\x1b\n" +
|
||||
"\tdevice_id\x18\x06 \x01(\tR\bdeviceId\"G\n" +
|
||||
"\x13GetSessionsResponse\x120\n" +
|
||||
"\bsessions\x18\x01 \x03(\v2\x14.auth.v1.SessionItemR\bsessions\"S\n" +
|
||||
"\x17TerminateSessionRequest\x12\x17\n" +
|
||||
|
||||
@@ -14,6 +14,10 @@ export const protobufPackage = "auth.v1";
|
||||
export interface LoginRequest {
|
||||
username: string;
|
||||
password: string;
|
||||
/** Уникальный идентификатор устройства клиента */
|
||||
deviceId: string;
|
||||
/** Публичный ключ устройства для шифрования сообщений */
|
||||
publicKey: string;
|
||||
}
|
||||
|
||||
export interface LoginResponse {
|
||||
@@ -58,6 +62,7 @@ export interface VerifyTokenResponse {
|
||||
permissions: string[];
|
||||
sessionId?: string | undefined;
|
||||
requiresPin?: boolean | undefined;
|
||||
deviceId?: string | undefined;
|
||||
}
|
||||
|
||||
export interface GetAccountRoleLevelRequest {
|
||||
@@ -83,6 +88,7 @@ export interface SessionItem {
|
||||
lastActivity: number;
|
||||
/** Флаг текущей сессии */
|
||||
isCurrent: boolean;
|
||||
deviceId: string;
|
||||
}
|
||||
|
||||
export interface GetSessionsResponse {
|
||||
|
||||
Reference in New Issue
Block a user