Compare commits
36 Commits
v1.0.32
...
bf518104e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf518104e4 | ||
|
|
2eaed0a1c5 | ||
|
|
f0a82d9c64 | ||
|
|
a8a57a1b28 | ||
|
|
e778fda3a7 | ||
|
|
042d475d6c | ||
|
|
81f82bd0d1 | ||
|
|
2f97e6e9b8 | ||
|
|
07977879a3 | ||
|
|
11d27550dd | ||
|
|
b67faaeb7e | ||
|
|
089e8e305d | ||
|
|
9e8b59c82a | ||
|
|
7c7c165f97 | ||
|
|
17dac7aad6 | ||
|
|
ceb5e914b2 | ||
|
|
b748c4e182 | ||
|
|
7137cd3649 | ||
|
|
9427a6b70b | ||
|
|
1221bc490a | ||
|
|
75b8bd5af5 | ||
|
|
a996973c97 | ||
|
|
b7cd9c1434 | ||
|
|
7e1b70125a | ||
|
|
cbc0bf9154 | ||
|
|
7bb94f817b | ||
|
|
976b655ff2 | ||
|
|
641e2277d0 | ||
|
|
44c1cfb80a | ||
|
|
482ffdd386 | ||
|
|
0de3225481 | ||
|
|
8cbc2f86b3 | ||
|
|
47e9aa47b9 | ||
|
|
3a38e5f06c | ||
|
|
97a6e14a77 | ||
|
|
e4b4a30664 |
107
gen/account.ts
107
gen/account.ts
@@ -9,14 +9,7 @@ import type { Metadata } from "@grpc/grpc-js";
|
|||||||
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
export const protobufPackage = "account";
|
export const protobufPackage = "account.v1";
|
||||||
|
|
||||||
export enum Presence {
|
|
||||||
PRESENCE_UNSPECIFIED = 0,
|
|
||||||
OFFLINE = 1,
|
|
||||||
ONLINE = 2,
|
|
||||||
UNRECOGNIZED = -1,
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAccountRequest {
|
export interface GetAccountRequest {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -33,7 +26,7 @@ export interface GetAccountResponse {
|
|||||||
roles: string[];
|
roles: string[];
|
||||||
avatarUrl: string;
|
avatarUrl: string;
|
||||||
employeeId?: string | undefined;
|
employeeId?: string | undefined;
|
||||||
presence: Presence;
|
presence: string;
|
||||||
lastActive: string;
|
lastActive: string;
|
||||||
customStatusText: string;
|
customStatusText: string;
|
||||||
customStatusEmoji: string;
|
customStatusEmoji: string;
|
||||||
@@ -43,10 +36,77 @@ export interface GetAccountResponse {
|
|||||||
hasPin: boolean;
|
hasPin: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ACCOUNT_PACKAGE_NAME = "account";
|
export interface ChangePasswordRequest {
|
||||||
|
userId: string;
|
||||||
|
oldPassword: string;
|
||||||
|
newPassword: string;
|
||||||
|
code?: string | undefined;
|
||||||
|
sessionId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChangePasswordResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SetPinRequest {
|
||||||
|
userId: string;
|
||||||
|
sessionId: string;
|
||||||
|
pin: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SetPinResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnlockPinRequest {
|
||||||
|
userId: string;
|
||||||
|
sessionId: string;
|
||||||
|
pin: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnlockPinResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetPinStatusRequest {
|
||||||
|
userId: string;
|
||||||
|
sessionId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetPinStatusResponse {
|
||||||
|
hasPin: boolean;
|
||||||
|
isLocked: boolean;
|
||||||
|
lockUntil: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RemovePinRequest {
|
||||||
|
pin: string;
|
||||||
|
userId: string;
|
||||||
|
sessionId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RemovePinResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
||||||
|
|
||||||
export interface AccountServiceClient {
|
export interface AccountServiceClient {
|
||||||
getAccount(request: GetAccountRequest, metadata?: Metadata): Observable<GetAccountResponse>;
|
getAccount(request: GetAccountRequest, metadata?: Metadata): Observable<GetAccountResponse>;
|
||||||
|
|
||||||
|
changePassword(request: ChangePasswordRequest, metadata?: Metadata): Observable<ChangePasswordResponse>;
|
||||||
|
|
||||||
|
setPin(request: SetPinRequest, metadata?: Metadata): Observable<SetPinResponse>;
|
||||||
|
|
||||||
|
unlockPin(request: UnlockPinRequest, metadata?: Metadata): Observable<UnlockPinResponse>;
|
||||||
|
|
||||||
|
getPinStatus(request: GetPinStatusRequest, metadata?: Metadata): Observable<GetPinStatusResponse>;
|
||||||
|
|
||||||
|
removePin(request: RemovePinRequest, metadata?: Metadata): Observable<RemovePinResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AccountServiceController {
|
export interface AccountServiceController {
|
||||||
@@ -54,11 +114,36 @@ export interface AccountServiceController {
|
|||||||
request: GetAccountRequest,
|
request: GetAccountRequest,
|
||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
||||||
|
|
||||||
|
changePassword(
|
||||||
|
request: ChangePasswordRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<ChangePasswordResponse> | Observable<ChangePasswordResponse> | ChangePasswordResponse;
|
||||||
|
|
||||||
|
setPin(
|
||||||
|
request: SetPinRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<SetPinResponse> | Observable<SetPinResponse> | SetPinResponse;
|
||||||
|
|
||||||
|
unlockPin(
|
||||||
|
request: UnlockPinRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<UnlockPinResponse> | Observable<UnlockPinResponse> | UnlockPinResponse;
|
||||||
|
|
||||||
|
getPinStatus(
|
||||||
|
request: GetPinStatusRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<GetPinStatusResponse> | Observable<GetPinStatusResponse> | GetPinStatusResponse;
|
||||||
|
|
||||||
|
removePin(
|
||||||
|
request: RemovePinRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<RemovePinResponse> | Observable<RemovePinResponse> | RemovePinResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function AccountServiceControllerMethods() {
|
export function AccountServiceControllerMethods() {
|
||||||
return function (constructor: Function) {
|
return function (constructor: Function) {
|
||||||
const grpcMethods: string[] = ["getAccount"];
|
const grpcMethods: string[] = ["getAccount", "changePassword", "setPin", "unlockPin", "getPinStatus", "removePin"];
|
||||||
for (const method of grpcMethods) {
|
for (const method of grpcMethods) {
|
||||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
|||||||
56
gen/auth.ts
56
gen/auth.ts
@@ -36,7 +36,8 @@ export interface RefreshResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LogoutRequest {
|
export interface LogoutRequest {
|
||||||
accessToken: string;
|
userId: string;
|
||||||
|
sessionId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LogoutResponse {
|
export interface LogoutResponse {
|
||||||
@@ -68,12 +69,33 @@ export interface GetAccountRoleLevelResponse {
|
|||||||
roleLevel: number;
|
roleLevel: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UnlockPinRequest {
|
export interface GetSessionRequest {
|
||||||
accessToken: string;
|
userId: string;
|
||||||
pinCode: string;
|
currentSessionId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UnlockPinResponse {
|
export interface SessionItem {
|
||||||
|
/** Здесь будет лежать захэшированный ID */
|
||||||
|
id: string;
|
||||||
|
ipAddress: string;
|
||||||
|
userAgent: string;
|
||||||
|
/** Unix timestamp в миллисекундах */
|
||||||
|
lastActivity: number;
|
||||||
|
/** Флаг текущей сессии */
|
||||||
|
isCurrent: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetSessionsResponse {
|
||||||
|
sessions: SessionItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TerminateSessionRequest {
|
||||||
|
userId: string;
|
||||||
|
/** Хэш сессии, которую нужно убить */
|
||||||
|
targetHash: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TerminateSessionResponse {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
@@ -94,9 +116,11 @@ export interface AuthServiceClient {
|
|||||||
|
|
||||||
logout(request: LogoutRequest, metadata?: Metadata): Observable<LogoutResponse>;
|
logout(request: LogoutRequest, metadata?: Metadata): Observable<LogoutResponse>;
|
||||||
|
|
||||||
logoutAll(request: LogoutRequest, metadata?: Metadata): Observable<LogoutResponse>;
|
logoutOther(request: LogoutRequest, metadata?: Metadata): Observable<LogoutResponse>;
|
||||||
|
|
||||||
unlockPin(request: UnlockPinRequest, metadata?: Metadata): Observable<UnlockPinResponse>;
|
getSessions(request: GetSessionRequest, metadata?: Metadata): Observable<GetSessionsResponse>;
|
||||||
|
|
||||||
|
terminateSession(request: TerminateSessionRequest, metadata?: Metadata): Observable<TerminateSessionResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AuthServiceController {
|
export interface AuthServiceController {
|
||||||
@@ -122,15 +146,20 @@ export interface AuthServiceController {
|
|||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
||||||
|
|
||||||
logoutAll(
|
logoutOther(
|
||||||
request: LogoutRequest,
|
request: LogoutRequest,
|
||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
||||||
|
|
||||||
unlockPin(
|
getSessions(
|
||||||
request: UnlockPinRequest,
|
request: GetSessionRequest,
|
||||||
metadata?: Metadata,
|
metadata?: Metadata,
|
||||||
): Promise<UnlockPinResponse> | Observable<UnlockPinResponse> | UnlockPinResponse;
|
): Promise<GetSessionsResponse> | Observable<GetSessionsResponse> | GetSessionsResponse;
|
||||||
|
|
||||||
|
terminateSession(
|
||||||
|
request: TerminateSessionRequest,
|
||||||
|
metadata?: Metadata,
|
||||||
|
): Promise<TerminateSessionResponse> | Observable<TerminateSessionResponse> | TerminateSessionResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function AuthServiceControllerMethods() {
|
export function AuthServiceControllerMethods() {
|
||||||
@@ -141,8 +170,9 @@ export function AuthServiceControllerMethods() {
|
|||||||
"verifyToken",
|
"verifyToken",
|
||||||
"getAccountRoleLevel",
|
"getAccountRoleLevel",
|
||||||
"logout",
|
"logout",
|
||||||
"logoutAll",
|
"logoutOther",
|
||||||
"unlockPin",
|
"getSessions",
|
||||||
|
"terminateSession",
|
||||||
];
|
];
|
||||||
for (const method of grpcMethods) {
|
for (const method of grpcMethods) {
|
||||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
|||||||
@@ -21,55 +21,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
type Presence int32
|
|
||||||
|
|
||||||
const (
|
|
||||||
Presence_PRESENCE_UNSPECIFIED Presence = 0
|
|
||||||
Presence_OFFLINE Presence = 1
|
|
||||||
Presence_ONLINE Presence = 2
|
|
||||||
)
|
|
||||||
|
|
||||||
// Enum value maps for Presence.
|
|
||||||
var (
|
|
||||||
Presence_name = map[int32]string{
|
|
||||||
0: "PRESENCE_UNSPECIFIED",
|
|
||||||
1: "OFFLINE",
|
|
||||||
2: "ONLINE",
|
|
||||||
}
|
|
||||||
Presence_value = map[string]int32{
|
|
||||||
"PRESENCE_UNSPECIFIED": 0,
|
|
||||||
"OFFLINE": 1,
|
|
||||||
"ONLINE": 2,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func (x Presence) Enum() *Presence {
|
|
||||||
p := new(Presence)
|
|
||||||
*p = x
|
|
||||||
return p
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x Presence) String() string {
|
|
||||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (Presence) Descriptor() protoreflect.EnumDescriptor {
|
|
||||||
return file_account_proto_enumTypes[0].Descriptor()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (Presence) Type() protoreflect.EnumType {
|
|
||||||
return &file_account_proto_enumTypes[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x Presence) Number() protoreflect.EnumNumber {
|
|
||||||
return protoreflect.EnumNumber(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use Presence.Descriptor instead.
|
|
||||||
func (Presence) EnumDescriptor() ([]byte, []int) {
|
|
||||||
return file_account_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetAccountRequest struct {
|
type GetAccountRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
@@ -126,7 +77,7 @@ type GetAccountResponse struct {
|
|||||||
Roles []string `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"`
|
Roles []string `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"`
|
||||||
AvatarUrl string `protobuf:"bytes,9,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
|
AvatarUrl string `protobuf:"bytes,9,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
|
||||||
EmployeeId *string `protobuf:"bytes,10,opt,name=employee_id,json=employeeId,proto3,oneof" json:"employee_id,omitempty"`
|
EmployeeId *string `protobuf:"bytes,10,opt,name=employee_id,json=employeeId,proto3,oneof" json:"employee_id,omitempty"`
|
||||||
Presence Presence `protobuf:"varint,11,opt,name=presence,proto3,enum=account.Presence" json:"presence,omitempty"`
|
Presence string `protobuf:"bytes,11,opt,name=presence,proto3" json:"presence,omitempty"`
|
||||||
LastActive string `protobuf:"bytes,12,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"`
|
LastActive string `protobuf:"bytes,12,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"`
|
||||||
CustomStatusText string `protobuf:"bytes,13,opt,name=custom_status_text,json=customStatusText,proto3" json:"custom_status_text,omitempty"`
|
CustomStatusText string `protobuf:"bytes,13,opt,name=custom_status_text,json=customStatusText,proto3" json:"custom_status_text,omitempty"`
|
||||||
CustomStatusEmoji string `protobuf:"bytes,14,opt,name=custom_status_emoji,json=customStatusEmoji,proto3" json:"custom_status_emoji,omitempty"`
|
CustomStatusEmoji string `protobuf:"bytes,14,opt,name=custom_status_emoji,json=customStatusEmoji,proto3" json:"custom_status_emoji,omitempty"`
|
||||||
@@ -238,11 +189,11 @@ func (x *GetAccountResponse) GetEmployeeId() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAccountResponse) GetPresence() Presence {
|
func (x *GetAccountResponse) GetPresence() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Presence
|
return x.Presence
|
||||||
}
|
}
|
||||||
return Presence_PRESENCE_UNSPECIFIED
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAccountResponse) GetLastActive() string {
|
func (x *GetAccountResponse) GetLastActive() string {
|
||||||
@@ -294,13 +245,590 @@ func (x *GetAccountResponse) GetHasPin() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ChangePasswordRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"`
|
||||||
|
NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
|
||||||
|
Code *string `protobuf:"bytes,5,opt,name=code,proto3,oneof" json:"code,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) Reset() {
|
||||||
|
*x = ChangePasswordRequest{}
|
||||||
|
mi := &file_account_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChangePasswordRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[2]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) GetOldPassword() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.OldPassword
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) GetNewPassword() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.NewPassword
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) GetCode() string {
|
||||||
|
if x != nil && x.Code != nil {
|
||||||
|
return *x.Code
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type ChangePasswordResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordResponse) Reset() {
|
||||||
|
*x = ChangePasswordResponse{}
|
||||||
|
mi := &file_account_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ChangePasswordResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ChangePasswordResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[3]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ChangePasswordResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ChangePasswordResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ChangePasswordResponse) GetMessage() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Message
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetPinRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
Pin string `protobuf:"bytes,3,opt,name=pin,proto3" json:"pin,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) Reset() {
|
||||||
|
*x = SetPinRequest{}
|
||||||
|
mi := &file_account_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SetPinRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[4]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use SetPinRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*SetPinRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinRequest) GetPin() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Pin
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetPinResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinResponse) Reset() {
|
||||||
|
*x = SetPinResponse{}
|
||||||
|
mi := &file_account_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SetPinResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *SetPinResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[5]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use SetPinResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*SetPinResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SetPinResponse) GetMessage() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Message
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnlockPinRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
Pin string `protobuf:"bytes,3,opt,name=pin,proto3" json:"pin,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) Reset() {
|
||||||
|
*x = UnlockPinRequest{}
|
||||||
|
mi := &file_account_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnlockPinRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[6]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UnlockPinRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UnlockPinRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinRequest) GetPin() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Pin
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnlockPinResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinResponse) Reset() {
|
||||||
|
*x = UnlockPinResponse{}
|
||||||
|
mi := &file_account_proto_msgTypes[7]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnlockPinResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UnlockPinResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[7]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UnlockPinResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UnlockPinResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{7}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnlockPinResponse) GetMessage() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Message
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPinStatusRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusRequest) Reset() {
|
||||||
|
*x = GetPinStatusRequest{}
|
||||||
|
mi := &file_account_proto_msgTypes[8]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPinStatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPinStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[8]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetPinStatusRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPinStatusRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{8}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetPinStatusResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
HasPin bool `protobuf:"varint,1,opt,name=has_pin,json=hasPin,proto3" json:"has_pin,omitempty"`
|
||||||
|
IsLocked bool `protobuf:"varint,2,opt,name=is_locked,json=isLocked,proto3" json:"is_locked,omitempty"`
|
||||||
|
LockUntil string `protobuf:"bytes,3,opt,name=lock_until,json=lockUntil,proto3" json:"lock_until,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) Reset() {
|
||||||
|
*x = GetPinStatusResponse{}
|
||||||
|
mi := &file_account_proto_msgTypes[9]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetPinStatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[9]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetPinStatusResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetPinStatusResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{9}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) GetHasPin() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.HasPin
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) GetIsLocked() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsLocked
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetPinStatusResponse) GetLockUntil() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.LockUntil
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemovePinRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Pin string `protobuf:"bytes,1,opt,name=pin,proto3" json:"pin,omitempty"`
|
||||||
|
UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) Reset() {
|
||||||
|
*x = RemovePinRequest{}
|
||||||
|
mi := &file_account_proto_msgTypes[10]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemovePinRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[10]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use RemovePinRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemovePinRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{10}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) GetPin() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Pin
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemovePinResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinResponse) Reset() {
|
||||||
|
*x = RemovePinResponse{}
|
||||||
|
mi := &file_account_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemovePinResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemovePinResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_proto_msgTypes[11]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use RemovePinResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemovePinResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_proto_rawDescGZIP(), []int{11}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemovePinResponse) GetMessage() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Message
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_account_proto protoreflect.FileDescriptor
|
var File_account_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_account_proto_rawDesc = "" +
|
const file_account_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\raccount.proto\x12\aaccount\"#\n" +
|
"\raccount.proto\x12\n" +
|
||||||
|
"account.v1\"#\n" +
|
||||||
"\x11GetAccountRequest\x12\x0e\n" +
|
"\x11GetAccountRequest\x12\x0e\n" +
|
||||||
"\x02id\x18\x01 \x01(\tR\x02id\"\xca\x04\n" +
|
"\x02id\x18\x01 \x01(\tR\x02id\"\xb7\x04\n" +
|
||||||
"\x12GetAccountResponse\x12\x0e\n" +
|
"\x12GetAccountResponse\x12\x0e\n" +
|
||||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" +
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" +
|
||||||
"\busername\x18\x02 \x01(\tR\busername\x12\x14\n" +
|
"\busername\x18\x02 \x01(\tR\busername\x12\x14\n" +
|
||||||
@@ -314,8 +842,8 @@ const file_account_proto_rawDesc = "" +
|
|||||||
"avatar_url\x18\t \x01(\tR\tavatarUrl\x12$\n" +
|
"avatar_url\x18\t \x01(\tR\tavatarUrl\x12$\n" +
|
||||||
"\vemployee_id\x18\n" +
|
"\vemployee_id\x18\n" +
|
||||||
" \x01(\tH\x00R\n" +
|
" \x01(\tH\x00R\n" +
|
||||||
"employeeId\x88\x01\x01\x12-\n" +
|
"employeeId\x88\x01\x01\x12\x1a\n" +
|
||||||
"\bpresence\x18\v \x01(\x0e2\x11.account.PresenceR\bpresence\x12\x1f\n" +
|
"\bpresence\x18\v \x01(\tR\bpresence\x12\x1f\n" +
|
||||||
"\vlast_active\x18\f \x01(\tR\n" +
|
"\vlast_active\x18\f \x01(\tR\n" +
|
||||||
"lastActive\x12,\n" +
|
"lastActive\x12,\n" +
|
||||||
"\x12custom_status_text\x18\r \x01(\tR\x10customStatusText\x12.\n" +
|
"\x12custom_status_text\x18\r \x01(\tR\x10customStatusText\x12.\n" +
|
||||||
@@ -324,15 +852,59 @@ const file_account_proto_rawDesc = "" +
|
|||||||
"\blanguage\x18\x10 \x01(\tR\blanguage\x12$\n" +
|
"\blanguage\x18\x10 \x01(\tR\blanguage\x12$\n" +
|
||||||
"\x0etwo_fa_enabled\x18\x11 \x01(\bR\ftwoFaEnabled\x12\x17\n" +
|
"\x0etwo_fa_enabled\x18\x11 \x01(\bR\ftwoFaEnabled\x12\x17\n" +
|
||||||
"\ahas_pin\x18\x12 \x01(\bR\x06hasPinB\x0e\n" +
|
"\ahas_pin\x18\x12 \x01(\bR\x06hasPinB\x0e\n" +
|
||||||
"\f_employee_id*=\n" +
|
"\f_employee_id\"\xb7\x01\n" +
|
||||||
"\bPresence\x12\x18\n" +
|
"\x15ChangePasswordRequest\x12\x17\n" +
|
||||||
"\x14PRESENCE_UNSPECIFIED\x10\x00\x12\v\n" +
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12!\n" +
|
||||||
"\aOFFLINE\x10\x01\x12\n" +
|
"\fold_password\x18\x03 \x01(\tR\voldPassword\x12!\n" +
|
||||||
|
"\fnew_password\x18\x04 \x01(\tR\vnewPassword\x12\x17\n" +
|
||||||
|
"\x04code\x18\x05 \x01(\tH\x00R\x04code\x88\x01\x01\x12\x1d\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\x06ONLINE\x10\x022W\n" +
|
"session_id\x18\x06 \x01(\tR\tsessionIdB\a\n" +
|
||||||
"\x0eAccountService\x12E\n" +
|
"\x05_code\"L\n" +
|
||||||
|
"\x16ChangePasswordResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
|
"\amessage\x18\x02 \x01(\tR\amessage\"Y\n" +
|
||||||
|
"\rSetPinRequest\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"GetAccount\x12\x1a.account.GetAccountRequest\x1a\x1b.account.GetAccountResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
"session_id\x18\x02 \x01(\tR\tsessionId\x12\x10\n" +
|
||||||
|
"\x03pin\x18\x03 \x01(\tR\x03pin\"D\n" +
|
||||||
|
"\x0eSetPinResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
|
"\amessage\x18\x02 \x01(\tR\amessage\"\\\n" +
|
||||||
|
"\x10UnlockPinRequest\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"session_id\x18\x02 \x01(\tR\tsessionId\x12\x10\n" +
|
||||||
|
"\x03pin\x18\x03 \x01(\tR\x03pin\"G\n" +
|
||||||
|
"\x11UnlockPinResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
|
"\amessage\x18\x02 \x01(\tR\amessage\"M\n" +
|
||||||
|
"\x13GetPinStatusRequest\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"session_id\x18\x02 \x01(\tR\tsessionId\"k\n" +
|
||||||
|
"\x14GetPinStatusResponse\x12\x17\n" +
|
||||||
|
"\ahas_pin\x18\x01 \x01(\bR\x06hasPin\x12\x1b\n" +
|
||||||
|
"\tis_locked\x18\x02 \x01(\bR\bisLocked\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"lock_until\x18\x03 \x01(\tR\tlockUntil\"\\\n" +
|
||||||
|
"\x10RemovePinRequest\x12\x10\n" +
|
||||||
|
"\x03pin\x18\x01 \x01(\tR\x03pin\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x02 \x01(\tR\x06userId\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"session_id\x18\x03 \x01(\tR\tsessionId\"G\n" +
|
||||||
|
"\x11RemovePinResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
|
"\amessage\x18\x02 \x01(\tR\amessage2\xde\x03\n" +
|
||||||
|
"\x0eAccountService\x12K\n" +
|
||||||
|
"\n" +
|
||||||
|
"GetAccount\x12\x1d.account.v1.GetAccountRequest\x1a\x1e.account.v1.GetAccountResponse\x12W\n" +
|
||||||
|
"\x0eChangePassword\x12!.account.v1.ChangePasswordRequest\x1a\".account.v1.ChangePasswordResponse\x12?\n" +
|
||||||
|
"\x06SetPin\x12\x19.account.v1.SetPinRequest\x1a\x1a.account.v1.SetPinResponse\x12H\n" +
|
||||||
|
"\tUnlockPin\x12\x1c.account.v1.UnlockPinRequest\x1a\x1d.account.v1.UnlockPinResponse\x12Q\n" +
|
||||||
|
"\fGetPinStatus\x12\x1f.account.v1.GetPinStatusRequest\x1a .account.v1.GetPinStatusResponse\x12H\n" +
|
||||||
|
"\tRemovePin\x12\x1c.account.v1.RemovePinRequest\x1a\x1d.account.v1.RemovePinResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_account_proto_rawDescOnce sync.Once
|
file_account_proto_rawDescOnce sync.Once
|
||||||
@@ -346,22 +918,39 @@ func file_account_proto_rawDescGZIP() []byte {
|
|||||||
return file_account_proto_rawDescData
|
return file_account_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||||
var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
||||||
var file_account_proto_goTypes = []any{
|
var file_account_proto_goTypes = []any{
|
||||||
(Presence)(0), // 0: account.Presence
|
(*GetAccountRequest)(nil), // 0: account.v1.GetAccountRequest
|
||||||
(*GetAccountRequest)(nil), // 1: account.GetAccountRequest
|
(*GetAccountResponse)(nil), // 1: account.v1.GetAccountResponse
|
||||||
(*GetAccountResponse)(nil), // 2: account.GetAccountResponse
|
(*ChangePasswordRequest)(nil), // 2: account.v1.ChangePasswordRequest
|
||||||
|
(*ChangePasswordResponse)(nil), // 3: account.v1.ChangePasswordResponse
|
||||||
|
(*SetPinRequest)(nil), // 4: account.v1.SetPinRequest
|
||||||
|
(*SetPinResponse)(nil), // 5: account.v1.SetPinResponse
|
||||||
|
(*UnlockPinRequest)(nil), // 6: account.v1.UnlockPinRequest
|
||||||
|
(*UnlockPinResponse)(nil), // 7: account.v1.UnlockPinResponse
|
||||||
|
(*GetPinStatusRequest)(nil), // 8: account.v1.GetPinStatusRequest
|
||||||
|
(*GetPinStatusResponse)(nil), // 9: account.v1.GetPinStatusResponse
|
||||||
|
(*RemovePinRequest)(nil), // 10: account.v1.RemovePinRequest
|
||||||
|
(*RemovePinResponse)(nil), // 11: account.v1.RemovePinResponse
|
||||||
}
|
}
|
||||||
var file_account_proto_depIdxs = []int32{
|
var file_account_proto_depIdxs = []int32{
|
||||||
0, // 0: account.GetAccountResponse.presence:type_name -> account.Presence
|
0, // 0: account.v1.AccountService.GetAccount:input_type -> account.v1.GetAccountRequest
|
||||||
1, // 1: account.AccountService.GetAccount:input_type -> account.GetAccountRequest
|
2, // 1: account.v1.AccountService.ChangePassword:input_type -> account.v1.ChangePasswordRequest
|
||||||
2, // 2: account.AccountService.GetAccount:output_type -> account.GetAccountResponse
|
4, // 2: account.v1.AccountService.SetPin:input_type -> account.v1.SetPinRequest
|
||||||
2, // [2:3] is the sub-list for method output_type
|
6, // 3: account.v1.AccountService.UnlockPin:input_type -> account.v1.UnlockPinRequest
|
||||||
1, // [1:2] is the sub-list for method input_type
|
8, // 4: account.v1.AccountService.GetPinStatus:input_type -> account.v1.GetPinStatusRequest
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
10, // 5: account.v1.AccountService.RemovePin:input_type -> account.v1.RemovePinRequest
|
||||||
1, // [1:1] is the sub-list for extension extendee
|
1, // 6: account.v1.AccountService.GetAccount:output_type -> account.v1.GetAccountResponse
|
||||||
0, // [0:1] is the sub-list for field type_name
|
3, // 7: account.v1.AccountService.ChangePassword:output_type -> account.v1.ChangePasswordResponse
|
||||||
|
5, // 8: account.v1.AccountService.SetPin:output_type -> account.v1.SetPinResponse
|
||||||
|
7, // 9: account.v1.AccountService.UnlockPin:output_type -> account.v1.UnlockPinResponse
|
||||||
|
9, // 10: account.v1.AccountService.GetPinStatus:output_type -> account.v1.GetPinStatusResponse
|
||||||
|
11, // 11: account.v1.AccountService.RemovePin:output_type -> account.v1.RemovePinResponse
|
||||||
|
6, // [6:12] is the sub-list for method output_type
|
||||||
|
0, // [0:6] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_account_proto_init() }
|
func init() { file_account_proto_init() }
|
||||||
@@ -370,19 +959,19 @@ func file_account_proto_init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_account_proto_msgTypes[1].OneofWrappers = []any{}
|
file_account_proto_msgTypes[1].OneofWrappers = []any{}
|
||||||
|
file_account_proto_msgTypes[2].OneofWrappers = []any{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)),
|
||||||
NumEnums: 1,
|
NumEnums: 0,
|
||||||
NumMessages: 2,
|
NumMessages: 12,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_account_proto_goTypes,
|
GoTypes: file_account_proto_goTypes,
|
||||||
DependencyIndexes: file_account_proto_depIdxs,
|
DependencyIndexes: file_account_proto_depIdxs,
|
||||||
EnumInfos: file_account_proto_enumTypes,
|
|
||||||
MessageInfos: file_account_proto_msgTypes,
|
MessageInfos: file_account_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_account_proto = out.File
|
File_account_proto = out.File
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AccountService_GetAccount_FullMethodName = "/account.AccountService/GetAccount"
|
AccountService_GetAccount_FullMethodName = "/account.v1.AccountService/GetAccount"
|
||||||
|
AccountService_ChangePassword_FullMethodName = "/account.v1.AccountService/ChangePassword"
|
||||||
|
AccountService_SetPin_FullMethodName = "/account.v1.AccountService/SetPin"
|
||||||
|
AccountService_UnlockPin_FullMethodName = "/account.v1.AccountService/UnlockPin"
|
||||||
|
AccountService_GetPinStatus_FullMethodName = "/account.v1.AccountService/GetPinStatus"
|
||||||
|
AccountService_RemovePin_FullMethodName = "/account.v1.AccountService/RemovePin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AccountServiceClient is the client API for AccountService service.
|
// AccountServiceClient is the client API for AccountService service.
|
||||||
@@ -27,6 +32,11 @@ const (
|
|||||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
type AccountServiceClient interface {
|
type AccountServiceClient interface {
|
||||||
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
||||||
|
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
|
||||||
|
SetPin(ctx context.Context, in *SetPinRequest, opts ...grpc.CallOption) (*SetPinResponse, error)
|
||||||
|
UnlockPin(ctx context.Context, in *UnlockPinRequest, opts ...grpc.CallOption) (*UnlockPinResponse, error)
|
||||||
|
GetPinStatus(ctx context.Context, in *GetPinStatusRequest, opts ...grpc.CallOption) (*GetPinStatusResponse, error)
|
||||||
|
RemovePin(ctx context.Context, in *RemovePinRequest, opts ...grpc.CallOption) (*RemovePinResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type accountServiceClient struct {
|
type accountServiceClient struct {
|
||||||
@@ -47,11 +57,66 @@ func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountReq
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *accountServiceClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ChangePasswordResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AccountService_ChangePassword_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *accountServiceClient) SetPin(ctx context.Context, in *SetPinRequest, opts ...grpc.CallOption) (*SetPinResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SetPinResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AccountService_SetPin_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *accountServiceClient) UnlockPin(ctx context.Context, in *UnlockPinRequest, opts ...grpc.CallOption) (*UnlockPinResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UnlockPinResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AccountService_UnlockPin_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *accountServiceClient) GetPinStatus(ctx context.Context, in *GetPinStatusRequest, opts ...grpc.CallOption) (*GetPinStatusResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetPinStatusResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AccountService_GetPinStatus_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *accountServiceClient) RemovePin(ctx context.Context, in *RemovePinRequest, opts ...grpc.CallOption) (*RemovePinResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(RemovePinResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AccountService_RemovePin_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// AccountServiceServer is the server API for AccountService service.
|
// AccountServiceServer is the server API for AccountService service.
|
||||||
// All implementations must embed UnimplementedAccountServiceServer
|
// All implementations must embed UnimplementedAccountServiceServer
|
||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
type AccountServiceServer interface {
|
type AccountServiceServer interface {
|
||||||
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
||||||
|
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
||||||
|
SetPin(context.Context, *SetPinRequest) (*SetPinResponse, error)
|
||||||
|
UnlockPin(context.Context, *UnlockPinRequest) (*UnlockPinResponse, error)
|
||||||
|
GetPinStatus(context.Context, *GetPinStatusRequest) (*GetPinStatusResponse, error)
|
||||||
|
RemovePin(context.Context, *RemovePinRequest) (*RemovePinResponse, error)
|
||||||
mustEmbedUnimplementedAccountServiceServer()
|
mustEmbedUnimplementedAccountServiceServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +130,21 @@ type UnimplementedAccountServiceServer struct{}
|
|||||||
func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method GetAccount not implemented")
|
return nil, status.Error(codes.Unimplemented, "method GetAccount not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedAccountServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ChangePassword not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAccountServiceServer) SetPin(context.Context, *SetPinRequest) (*SetPinResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method SetPin not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAccountServiceServer) UnlockPin(context.Context, *UnlockPinRequest) (*UnlockPinResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method UnlockPin not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAccountServiceServer) GetPinStatus(context.Context, *GetPinStatusRequest) (*GetPinStatusResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetPinStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAccountServiceServer) RemovePin(context.Context, *RemovePinRequest) (*RemovePinResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method RemovePin not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {}
|
func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {}
|
||||||
func (UnimplementedAccountServiceServer) testEmbeddedByValue() {}
|
func (UnimplementedAccountServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
@@ -104,17 +184,127 @@ func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, de
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _AccountService_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ChangePasswordRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AccountServiceServer).ChangePassword(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AccountService_ChangePassword_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AccountServiceServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _AccountService_SetPin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SetPinRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AccountServiceServer).SetPin(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AccountService_SetPin_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AccountServiceServer).SetPin(ctx, req.(*SetPinRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _AccountService_UnlockPin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UnlockPinRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AccountServiceServer).UnlockPin(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AccountService_UnlockPin_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AccountServiceServer).UnlockPin(ctx, req.(*UnlockPinRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _AccountService_GetPinStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetPinStatusRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AccountServiceServer).GetPinStatus(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AccountService_GetPinStatus_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AccountServiceServer).GetPinStatus(ctx, req.(*GetPinStatusRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _AccountService_RemovePin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RemovePinRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AccountServiceServer).RemovePin(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AccountService_RemovePin_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AccountServiceServer).RemovePin(ctx, req.(*RemovePinRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
|
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var AccountService_ServiceDesc = grpc.ServiceDesc{
|
var AccountService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "account.AccountService",
|
ServiceName: "account.v1.AccountService",
|
||||||
HandlerType: (*AccountServiceServer)(nil),
|
HandlerType: (*AccountServiceServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
MethodName: "GetAccount",
|
MethodName: "GetAccount",
|
||||||
Handler: _AccountService_GetAccount_Handler,
|
Handler: _AccountService_GetAccount_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ChangePassword",
|
||||||
|
Handler: _AccountService_ChangePassword_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SetPin",
|
||||||
|
Handler: _AccountService_SetPin_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UnlockPin",
|
||||||
|
Handler: _AccountService_UnlockPin_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetPinStatus",
|
||||||
|
Handler: _AccountService_GetPinStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RemovePin",
|
||||||
|
Handler: _AccountService_RemovePin_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "account.proto",
|
Metadata: "account.proto",
|
||||||
|
|||||||
@@ -263,7 +263,8 @@ func (x *RefreshResponse) GetRefreshToken() string {
|
|||||||
|
|
||||||
type LogoutRequest struct {
|
type LogoutRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -298,9 +299,16 @@ func (*LogoutRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_auth_proto_rawDescGZIP(), []int{4}
|
return file_auth_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LogoutRequest) GetAccessToken() string {
|
func (x *LogoutRequest) GetUserId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AccessToken
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LogoutRequest) GetSessionId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SessionId
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -597,28 +605,28 @@ func (x *GetAccountRoleLevelResponse) GetRoleLevel() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnlockPinRequest struct {
|
type GetSessionRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
PinCode string `protobuf:"bytes,2,opt,name=pin_code,json=pinCode,proto3" json:"pin_code,omitempty"`
|
CurrentSessionId string `protobuf:"bytes,2,opt,name=current_session_id,json=currentSessionId,proto3" json:"current_session_id,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinRequest) Reset() {
|
func (x *GetSessionRequest) Reset() {
|
||||||
*x = UnlockPinRequest{}
|
*x = GetSessionRequest{}
|
||||||
mi := &file_auth_proto_msgTypes[10]
|
mi := &file_auth_proto_msgTypes[10]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinRequest) String() string {
|
func (x *GetSessionRequest) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*UnlockPinRequest) ProtoMessage() {}
|
func (*GetSessionRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UnlockPinRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetSessionRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_auth_proto_msgTypes[10]
|
mi := &file_auth_proto_msgTypes[10]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@@ -630,26 +638,198 @@ func (x *UnlockPinRequest) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use UnlockPinRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*UnlockPinRequest) Descriptor() ([]byte, []int) {
|
func (*GetSessionRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_auth_proto_rawDescGZIP(), []int{10}
|
return file_auth_proto_rawDescGZIP(), []int{10}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinRequest) GetAccessToken() string {
|
func (x *GetSessionRequest) GetUserId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.AccessToken
|
return x.UserId
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinRequest) GetPinCode() string {
|
func (x *GetSessionRequest) GetCurrentSessionId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.PinCode
|
return x.CurrentSessionId
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnlockPinResponse struct {
|
type SessionItem struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Здесь будет лежать захэшированный ID
|
||||||
|
IpAddress string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
|
||||||
|
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"` // Флаг текущей сессии
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) Reset() {
|
||||||
|
*x = SessionItem{}
|
||||||
|
mi := &file_auth_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SessionItem) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *SessionItem) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auth_proto_msgTypes[11]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use SessionItem.ProtoReflect.Descriptor instead.
|
||||||
|
func (*SessionItem) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auth_proto_rawDescGZIP(), []int{11}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) GetIpAddress() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.IpAddress
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) GetUserAgent() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserAgent
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) GetLastActivity() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.LastActivity
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SessionItem) GetIsCurrent() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsCurrent
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetSessionsResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Sessions []*SessionItem `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetSessionsResponse) Reset() {
|
||||||
|
*x = GetSessionsResponse{}
|
||||||
|
mi := &file_auth_proto_msgTypes[12]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetSessionsResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetSessionsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetSessionsResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auth_proto_msgTypes[12]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetSessionsResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetSessionsResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auth_proto_rawDescGZIP(), []int{12}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetSessionsResponse) GetSessions() []*SessionItem {
|
||||||
|
if x != nil {
|
||||||
|
return x.Sessions
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type TerminateSessionRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||||
|
TargetHash string `protobuf:"bytes,2,opt,name=target_hash,json=targetHash,proto3" json:"target_hash,omitempty"` // Хэш сессии, которую нужно убить
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TerminateSessionRequest) Reset() {
|
||||||
|
*x = TerminateSessionRequest{}
|
||||||
|
mi := &file_auth_proto_msgTypes[13]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TerminateSessionRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*TerminateSessionRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *TerminateSessionRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auth_proto_msgTypes[13]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use TerminateSessionRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*TerminateSessionRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auth_proto_rawDescGZIP(), []int{13}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TerminateSessionRequest) GetUserId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *TerminateSessionRequest) GetTargetHash() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TargetHash
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type TerminateSessionResponse struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
@@ -657,21 +837,21 @@ type UnlockPinResponse struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinResponse) Reset() {
|
func (x *TerminateSessionResponse) Reset() {
|
||||||
*x = UnlockPinResponse{}
|
*x = TerminateSessionResponse{}
|
||||||
mi := &file_auth_proto_msgTypes[11]
|
mi := &file_auth_proto_msgTypes[14]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinResponse) String() string {
|
func (x *TerminateSessionResponse) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*UnlockPinResponse) ProtoMessage() {}
|
func (*TerminateSessionResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UnlockPinResponse) ProtoReflect() protoreflect.Message {
|
func (x *TerminateSessionResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_auth_proto_msgTypes[11]
|
mi := &file_auth_proto_msgTypes[14]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -682,19 +862,19 @@ func (x *UnlockPinResponse) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use UnlockPinResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TerminateSessionResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*UnlockPinResponse) Descriptor() ([]byte, []int) {
|
func (*TerminateSessionResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_auth_proto_rawDescGZIP(), []int{11}
|
return file_auth_proto_rawDescGZIP(), []int{14}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinResponse) GetSuccess() bool {
|
func (x *TerminateSessionResponse) GetSuccess() bool {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Success
|
return x.Success
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UnlockPinResponse) GetMessage() string {
|
func (x *TerminateSessionResponse) GetMessage() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Message
|
return x.Message
|
||||||
}
|
}
|
||||||
@@ -728,9 +908,11 @@ const file_auth_proto_rawDesc = "" +
|
|||||||
"\rrefresh_token\x18\x01 \x01(\tR\frefreshToken\"Y\n" +
|
"\rrefresh_token\x18\x01 \x01(\tR\frefreshToken\"Y\n" +
|
||||||
"\x0fRefreshResponse\x12!\n" +
|
"\x0fRefreshResponse\x12!\n" +
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" +
|
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" +
|
||||||
"\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\"2\n" +
|
"\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\"G\n" +
|
||||||
"\rLogoutRequest\x12!\n" +
|
"\rLogoutRequest\x12\x17\n" +
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\"D\n" +
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"session_id\x18\x02 \x01(\tR\tsessionId\"D\n" +
|
||||||
"\x0eLogoutResponse\x12\x18\n" +
|
"\x0eLogoutResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
"\amessage\x18\x02 \x01(\tR\amessage\"*\n" +
|
"\amessage\x18\x02 \x01(\tR\amessage\"*\n" +
|
||||||
@@ -759,21 +941,37 @@ const file_auth_proto_rawDesc = "" +
|
|||||||
"\x1bGetAccountRoleLevelResponse\x12\x14\n" +
|
"\x1bGetAccountRoleLevelResponse\x12\x14\n" +
|
||||||
"\x05found\x18\x01 \x01(\bR\x05found\x12\x1d\n" +
|
"\x05found\x18\x01 \x01(\bR\x05found\x12\x1d\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"role_level\x18\x02 \x01(\x05R\troleLevel\"P\n" +
|
"role_level\x18\x02 \x01(\x05R\troleLevel\"Z\n" +
|
||||||
"\x10UnlockPinRequest\x12!\n" +
|
"\x11GetSessionRequest\x12\x17\n" +
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12\x19\n" +
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12,\n" +
|
||||||
"\bpin_code\x18\x02 \x01(\tR\apinCode\"G\n" +
|
"\x12current_session_id\x18\x02 \x01(\tR\x10currentSessionId\"\x9f\x01\n" +
|
||||||
"\x11UnlockPinResponse\x12\x18\n" +
|
"\vSessionItem\x12\x0e\n" +
|
||||||
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"ip_address\x18\x02 \x01(\tR\tipAddress\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"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" +
|
||||||
|
"\x13GetSessionsResponse\x120\n" +
|
||||||
|
"\bsessions\x18\x01 \x03(\v2\x14.auth.v1.SessionItemR\bsessions\"S\n" +
|
||||||
|
"\x17TerminateSessionRequest\x12\x17\n" +
|
||||||
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1f\n" +
|
||||||
|
"\vtarget_hash\x18\x02 \x01(\tR\n" +
|
||||||
|
"targetHash\"N\n" +
|
||||||
|
"\x18TerminateSessionResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
||||||
"\amessage\x18\x02 \x01(\tR\amessage2\xec\x03\n" +
|
"\amessage\x18\x02 \x01(\tR\amessage2\xcc\x04\n" +
|
||||||
"\vAuthService\x126\n" +
|
"\vAuthService\x126\n" +
|
||||||
"\x05Login\x12\x15.auth.v1.LoginRequest\x1a\x16.auth.v1.LoginResponse\x12<\n" +
|
"\x05Login\x12\x15.auth.v1.LoginRequest\x1a\x16.auth.v1.LoginResponse\x12<\n" +
|
||||||
"\aRefresh\x12\x17.auth.v1.RefreshRequest\x1a\x18.auth.v1.RefreshResponse\x12H\n" +
|
"\aRefresh\x12\x17.auth.v1.RefreshRequest\x1a\x18.auth.v1.RefreshResponse\x12H\n" +
|
||||||
"\vVerifyToken\x12\x1b.auth.v1.VerifyTokenRequest\x1a\x1c.auth.v1.VerifyTokenResponse\x12`\n" +
|
"\vVerifyToken\x12\x1b.auth.v1.VerifyTokenRequest\x1a\x1c.auth.v1.VerifyTokenResponse\x12`\n" +
|
||||||
"\x13GetAccountRoleLevel\x12#.auth.v1.GetAccountRoleLevelRequest\x1a$.auth.v1.GetAccountRoleLevelResponse\x129\n" +
|
"\x13GetAccountRoleLevel\x12#.auth.v1.GetAccountRoleLevelRequest\x1a$.auth.v1.GetAccountRoleLevelResponse\x129\n" +
|
||||||
"\x06Logout\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12<\n" +
|
"\x06Logout\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12>\n" +
|
||||||
"\tLogoutAll\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12B\n" +
|
"\vLogoutOther\x12\x16.auth.v1.LogoutRequest\x1a\x17.auth.v1.LogoutResponse\x12G\n" +
|
||||||
"\tUnlockPin\x12\x19.auth.v1.UnlockPinRequest\x1a\x1a.auth.v1.UnlockPinResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
"\vGetSessions\x12\x1a.auth.v1.GetSessionRequest\x1a\x1c.auth.v1.GetSessionsResponse\x12W\n" +
|
||||||
|
"\x10TerminateSession\x12 .auth.v1.TerminateSessionRequest\x1a!.auth.v1.TerminateSessionResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_auth_proto_rawDescOnce sync.Once
|
file_auth_proto_rawDescOnce sync.Once
|
||||||
@@ -787,7 +985,7 @@ func file_auth_proto_rawDescGZIP() []byte {
|
|||||||
return file_auth_proto_rawDescData
|
return file_auth_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||||
var file_auth_proto_goTypes = []any{
|
var file_auth_proto_goTypes = []any{
|
||||||
(*LoginRequest)(nil), // 0: auth.v1.LoginRequest
|
(*LoginRequest)(nil), // 0: auth.v1.LoginRequest
|
||||||
(*LoginResponse)(nil), // 1: auth.v1.LoginResponse
|
(*LoginResponse)(nil), // 1: auth.v1.LoginResponse
|
||||||
@@ -799,29 +997,35 @@ var file_auth_proto_goTypes = []any{
|
|||||||
(*VerifyTokenResponse)(nil), // 7: auth.v1.VerifyTokenResponse
|
(*VerifyTokenResponse)(nil), // 7: auth.v1.VerifyTokenResponse
|
||||||
(*GetAccountRoleLevelRequest)(nil), // 8: auth.v1.GetAccountRoleLevelRequest
|
(*GetAccountRoleLevelRequest)(nil), // 8: auth.v1.GetAccountRoleLevelRequest
|
||||||
(*GetAccountRoleLevelResponse)(nil), // 9: auth.v1.GetAccountRoleLevelResponse
|
(*GetAccountRoleLevelResponse)(nil), // 9: auth.v1.GetAccountRoleLevelResponse
|
||||||
(*UnlockPinRequest)(nil), // 10: auth.v1.UnlockPinRequest
|
(*GetSessionRequest)(nil), // 10: auth.v1.GetSessionRequest
|
||||||
(*UnlockPinResponse)(nil), // 11: auth.v1.UnlockPinResponse
|
(*SessionItem)(nil), // 11: auth.v1.SessionItem
|
||||||
|
(*GetSessionsResponse)(nil), // 12: auth.v1.GetSessionsResponse
|
||||||
|
(*TerminateSessionRequest)(nil), // 13: auth.v1.TerminateSessionRequest
|
||||||
|
(*TerminateSessionResponse)(nil), // 14: auth.v1.TerminateSessionResponse
|
||||||
}
|
}
|
||||||
var file_auth_proto_depIdxs = []int32{
|
var file_auth_proto_depIdxs = []int32{
|
||||||
0, // 0: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
11, // 0: auth.v1.GetSessionsResponse.sessions:type_name -> auth.v1.SessionItem
|
||||||
2, // 1: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
0, // 1: auth.v1.AuthService.Login:input_type -> auth.v1.LoginRequest
|
||||||
6, // 2: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
2, // 2: auth.v1.AuthService.Refresh:input_type -> auth.v1.RefreshRequest
|
||||||
8, // 3: auth.v1.AuthService.GetAccountRoleLevel:input_type -> auth.v1.GetAccountRoleLevelRequest
|
6, // 3: auth.v1.AuthService.VerifyToken:input_type -> auth.v1.VerifyTokenRequest
|
||||||
4, // 4: auth.v1.AuthService.Logout:input_type -> auth.v1.LogoutRequest
|
8, // 4: auth.v1.AuthService.GetAccountRoleLevel:input_type -> auth.v1.GetAccountRoleLevelRequest
|
||||||
4, // 5: auth.v1.AuthService.LogoutAll:input_type -> auth.v1.LogoutRequest
|
4, // 5: auth.v1.AuthService.Logout:input_type -> auth.v1.LogoutRequest
|
||||||
10, // 6: auth.v1.AuthService.UnlockPin:input_type -> auth.v1.UnlockPinRequest
|
4, // 6: auth.v1.AuthService.LogoutOther:input_type -> auth.v1.LogoutRequest
|
||||||
1, // 7: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
10, // 7: auth.v1.AuthService.GetSessions:input_type -> auth.v1.GetSessionRequest
|
||||||
3, // 8: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
13, // 8: auth.v1.AuthService.TerminateSession:input_type -> auth.v1.TerminateSessionRequest
|
||||||
7, // 9: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
1, // 9: auth.v1.AuthService.Login:output_type -> auth.v1.LoginResponse
|
||||||
9, // 10: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
3, // 10: auth.v1.AuthService.Refresh:output_type -> auth.v1.RefreshResponse
|
||||||
5, // 11: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
7, // 11: auth.v1.AuthService.VerifyToken:output_type -> auth.v1.VerifyTokenResponse
|
||||||
5, // 12: auth.v1.AuthService.LogoutAll:output_type -> auth.v1.LogoutResponse
|
9, // 12: auth.v1.AuthService.GetAccountRoleLevel:output_type -> auth.v1.GetAccountRoleLevelResponse
|
||||||
11, // 13: auth.v1.AuthService.UnlockPin:output_type -> auth.v1.UnlockPinResponse
|
5, // 13: auth.v1.AuthService.Logout:output_type -> auth.v1.LogoutResponse
|
||||||
7, // [7:14] is the sub-list for method output_type
|
5, // 14: auth.v1.AuthService.LogoutOther:output_type -> auth.v1.LogoutResponse
|
||||||
0, // [0:7] is the sub-list for method input_type
|
12, // 15: auth.v1.AuthService.GetSessions:output_type -> auth.v1.GetSessionsResponse
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
14, // 16: auth.v1.AuthService.TerminateSession:output_type -> auth.v1.TerminateSessionResponse
|
||||||
0, // [0:0] is the sub-list for extension extendee
|
9, // [9:17] is the sub-list for method output_type
|
||||||
0, // [0:0] is the sub-list for field type_name
|
1, // [1:9] is the sub-list for method input_type
|
||||||
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
|
0, // [0:1] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_auth_proto_init() }
|
func init() { file_auth_proto_init() }
|
||||||
@@ -837,7 +1041,7 @@ func file_auth_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 12,
|
NumMessages: 15,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ const (
|
|||||||
AuthService_VerifyToken_FullMethodName = "/auth.v1.AuthService/VerifyToken"
|
AuthService_VerifyToken_FullMethodName = "/auth.v1.AuthService/VerifyToken"
|
||||||
AuthService_GetAccountRoleLevel_FullMethodName = "/auth.v1.AuthService/GetAccountRoleLevel"
|
AuthService_GetAccountRoleLevel_FullMethodName = "/auth.v1.AuthService/GetAccountRoleLevel"
|
||||||
AuthService_Logout_FullMethodName = "/auth.v1.AuthService/Logout"
|
AuthService_Logout_FullMethodName = "/auth.v1.AuthService/Logout"
|
||||||
AuthService_LogoutAll_FullMethodName = "/auth.v1.AuthService/LogoutAll"
|
AuthService_LogoutOther_FullMethodName = "/auth.v1.AuthService/LogoutOther"
|
||||||
AuthService_UnlockPin_FullMethodName = "/auth.v1.AuthService/UnlockPin"
|
AuthService_GetSessions_FullMethodName = "/auth.v1.AuthService/GetSessions"
|
||||||
|
AuthService_TerminateSession_FullMethodName = "/auth.v1.AuthService/TerminateSession"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuthServiceClient is the client API for AuthService service.
|
// AuthServiceClient is the client API for AuthService service.
|
||||||
@@ -37,8 +38,9 @@ type AuthServiceClient interface {
|
|||||||
VerifyToken(ctx context.Context, in *VerifyTokenRequest, opts ...grpc.CallOption) (*VerifyTokenResponse, error)
|
VerifyToken(ctx context.Context, in *VerifyTokenRequest, opts ...grpc.CallOption) (*VerifyTokenResponse, error)
|
||||||
GetAccountRoleLevel(ctx context.Context, in *GetAccountRoleLevelRequest, opts ...grpc.CallOption) (*GetAccountRoleLevelResponse, error)
|
GetAccountRoleLevel(ctx context.Context, in *GetAccountRoleLevelRequest, opts ...grpc.CallOption) (*GetAccountRoleLevelResponse, error)
|
||||||
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
Logout(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
||||||
LogoutAll(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
LogoutOther(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error)
|
||||||
UnlockPin(ctx context.Context, in *UnlockPinRequest, opts ...grpc.CallOption) (*UnlockPinResponse, error)
|
GetSessions(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error)
|
||||||
|
TerminateSession(ctx context.Context, in *TerminateSessionRequest, opts ...grpc.CallOption) (*TerminateSessionResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type authServiceClient struct {
|
type authServiceClient struct {
|
||||||
@@ -99,20 +101,30 @@ func (c *authServiceClient) Logout(ctx context.Context, in *LogoutRequest, opts
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *authServiceClient) LogoutAll(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) {
|
func (c *authServiceClient) LogoutOther(ctx context.Context, in *LogoutRequest, opts ...grpc.CallOption) (*LogoutResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(LogoutResponse)
|
out := new(LogoutResponse)
|
||||||
err := c.cc.Invoke(ctx, AuthService_LogoutAll_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, AuthService_LogoutOther_FullMethodName, in, out, cOpts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *authServiceClient) UnlockPin(ctx context.Context, in *UnlockPinRequest, opts ...grpc.CallOption) (*UnlockPinResponse, error) {
|
func (c *authServiceClient) GetSessions(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionsResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(UnlockPinResponse)
|
out := new(GetSessionsResponse)
|
||||||
err := c.cc.Invoke(ctx, AuthService_UnlockPin_FullMethodName, in, out, cOpts...)
|
err := c.cc.Invoke(ctx, AuthService_GetSessions_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *authServiceClient) TerminateSession(ctx context.Context, in *TerminateSessionRequest, opts ...grpc.CallOption) (*TerminateSessionResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(TerminateSessionResponse)
|
||||||
|
err := c.cc.Invoke(ctx, AuthService_TerminateSession_FullMethodName, in, out, cOpts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -128,8 +140,9 @@ type AuthServiceServer interface {
|
|||||||
VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
|
VerifyToken(context.Context, *VerifyTokenRequest) (*VerifyTokenResponse, error)
|
||||||
GetAccountRoleLevel(context.Context, *GetAccountRoleLevelRequest) (*GetAccountRoleLevelResponse, error)
|
GetAccountRoleLevel(context.Context, *GetAccountRoleLevelRequest) (*GetAccountRoleLevelResponse, error)
|
||||||
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
||||||
LogoutAll(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
LogoutOther(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
||||||
UnlockPin(context.Context, *UnlockPinRequest) (*UnlockPinResponse, error)
|
GetSessions(context.Context, *GetSessionRequest) (*GetSessionsResponse, error)
|
||||||
|
TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error)
|
||||||
mustEmbedUnimplementedAuthServiceServer()
|
mustEmbedUnimplementedAuthServiceServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,11 +168,14 @@ func (UnimplementedAuthServiceServer) GetAccountRoleLevel(context.Context, *GetA
|
|||||||
func (UnimplementedAuthServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
func (UnimplementedAuthServiceServer) Logout(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAuthServiceServer) LogoutAll(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
func (UnimplementedAuthServiceServer) LogoutOther(context.Context, *LogoutRequest) (*LogoutResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method LogoutAll not implemented")
|
return nil, status.Error(codes.Unimplemented, "method LogoutOther not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAuthServiceServer) UnlockPin(context.Context, *UnlockPinRequest) (*UnlockPinResponse, error) {
|
func (UnimplementedAuthServiceServer) GetSessions(context.Context, *GetSessionRequest) (*GetSessionsResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method UnlockPin not implemented")
|
return nil, status.Error(codes.Unimplemented, "method GetSessions not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedAuthServiceServer) TerminateSession(context.Context, *TerminateSessionRequest) (*TerminateSessionResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method TerminateSession not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
|
||||||
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
|
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
|
||||||
@@ -272,38 +288,56 @@ func _AuthService_Logout_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _AuthService_LogoutAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _AuthService_LogoutOther_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(LogoutRequest)
|
in := new(LogoutRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(AuthServiceServer).LogoutAll(ctx, in)
|
return srv.(AuthServiceServer).LogoutOther(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: AuthService_LogoutAll_FullMethodName,
|
FullMethod: AuthService_LogoutOther_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(AuthServiceServer).LogoutAll(ctx, req.(*LogoutRequest))
|
return srv.(AuthServiceServer).LogoutOther(ctx, req.(*LogoutRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _AuthService_UnlockPin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _AuthService_GetSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UnlockPinRequest)
|
in := new(GetSessionRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if interceptor == nil {
|
if interceptor == nil {
|
||||||
return srv.(AuthServiceServer).UnlockPin(ctx, in)
|
return srv.(AuthServiceServer).GetSessions(ctx, in)
|
||||||
}
|
}
|
||||||
info := &grpc.UnaryServerInfo{
|
info := &grpc.UnaryServerInfo{
|
||||||
Server: srv,
|
Server: srv,
|
||||||
FullMethod: AuthService_UnlockPin_FullMethodName,
|
FullMethod: AuthService_GetSessions_FullMethodName,
|
||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(AuthServiceServer).UnlockPin(ctx, req.(*UnlockPinRequest))
|
return srv.(AuthServiceServer).GetSessions(ctx, req.(*GetSessionRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _AuthService_TerminateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(TerminateSessionRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(AuthServiceServer).TerminateSession(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: AuthService_TerminateSession_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(AuthServiceServer).TerminateSession(ctx, req.(*TerminateSessionRequest))
|
||||||
}
|
}
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@@ -336,12 +370,16 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _AuthService_Logout_Handler,
|
Handler: _AuthService_Logout_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "LogoutAll",
|
MethodName: "LogoutOther",
|
||||||
Handler: _AuthService_LogoutAll_Handler,
|
Handler: _AuthService_LogoutOther_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UnlockPin",
|
MethodName: "GetSessions",
|
||||||
Handler: _AuthService_UnlockPin_Handler,
|
Handler: _AuthService_GetSessions_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "TerminateSession",
|
||||||
|
Handler: _AuthService_TerminateSession_Handler,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
|
|||||||
@@ -21,107 +21,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Полная модель пользователя
|
|
||||||
type UserData struct {
|
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
|
||||||
Dn string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"` // Полный путь в AD (Distinguished Name)
|
|
||||||
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // Логин (sAMAccountName)
|
|
||||||
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // ФИО (displayName)
|
|
||||||
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // Почта (mail)
|
|
||||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // Описание/Должность (description)
|
|
||||||
Avatar []byte `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // Аватарка в байтах (thumbnailPhoto)
|
|
||||||
Groups []string `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"` // Список групп
|
|
||||||
IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Статус аккаунта
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) Reset() {
|
|
||||||
*x = UserData{}
|
|
||||||
mi := &file_ldap_auth_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*UserData) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *UserData) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_ldap_auth_proto_msgTypes[0]
|
|
||||||
if x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use UserData.ProtoReflect.Descriptor instead.
|
|
||||||
func (*UserData) Descriptor() ([]byte, []int) {
|
|
||||||
return file_ldap_auth_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetDn() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Dn
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetUsername() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Username
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetDisplayName() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.DisplayName
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetEmail() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Email
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetDescription() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Description
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetAvatar() []byte {
|
|
||||||
if x != nil {
|
|
||||||
return x.Avatar
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetGroups() []string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Groups
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserData) GetIsActive() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.IsActive
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Авторизация ---
|
// --- Авторизация ---
|
||||||
type VerifyRequest struct {
|
type VerifyRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
@@ -133,7 +32,7 @@ type VerifyRequest struct {
|
|||||||
|
|
||||||
func (x *VerifyRequest) Reset() {
|
func (x *VerifyRequest) Reset() {
|
||||||
*x = VerifyRequest{}
|
*x = VerifyRequest{}
|
||||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
mi := &file_ldap_auth_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -145,7 +44,7 @@ func (x *VerifyRequest) String() string {
|
|||||||
func (*VerifyRequest) ProtoMessage() {}
|
func (*VerifyRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
mi := &file_ldap_auth_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -158,7 +57,7 @@ func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*VerifyRequest) Descriptor() ([]byte, []int) {
|
func (*VerifyRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_ldap_auth_proto_rawDescGZIP(), []int{1}
|
return file_ldap_auth_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *VerifyRequest) GetUsername() string {
|
func (x *VerifyRequest) GetUsername() string {
|
||||||
@@ -186,7 +85,7 @@ type VerifyResponse struct {
|
|||||||
|
|
||||||
func (x *VerifyResponse) Reset() {
|
func (x *VerifyResponse) Reset() {
|
||||||
*x = VerifyResponse{}
|
*x = VerifyResponse{}
|
||||||
mi := &file_ldap_auth_proto_msgTypes[2]
|
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -198,7 +97,7 @@ func (x *VerifyResponse) String() string {
|
|||||||
func (*VerifyResponse) ProtoMessage() {}
|
func (*VerifyResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_ldap_auth_proto_msgTypes[2]
|
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -211,7 +110,7 @@ func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*VerifyResponse) Descriptor() ([]byte, []int) {
|
func (*VerifyResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_ldap_auth_proto_rawDescGZIP(), []int{2}
|
return file_ldap_auth_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *VerifyResponse) GetSuccess() bool {
|
func (x *VerifyResponse) GetSuccess() bool {
|
||||||
@@ -239,23 +138,15 @@ var File_ldap_auth_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
const file_ldap_auth_proto_rawDesc = "" +
|
const file_ldap_auth_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\x0fldap-auth.proto\x12\fldap_auth.v1\"\xde\x01\n" +
|
"\x0fldap-auth.proto\x12\fldap_auth.v1\x1a\n" +
|
||||||
"\bUserData\x12\x0e\n" +
|
"ldap.proto\"G\n" +
|
||||||
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x1a\n" +
|
|
||||||
"\busername\x18\x02 \x01(\tR\busername\x12!\n" +
|
|
||||||
"\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12\x14\n" +
|
|
||||||
"\x05email\x18\x04 \x01(\tR\x05email\x12 \n" +
|
|
||||||
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x16\n" +
|
|
||||||
"\x06avatar\x18\x06 \x01(\fR\x06avatar\x12\x16\n" +
|
|
||||||
"\x06groups\x18\a \x03(\tR\x06groups\x12\x1b\n" +
|
|
||||||
"\tis_active\x18\b \x01(\bR\bisActive\"G\n" +
|
|
||||||
"\rVerifyRequest\x12\x1a\n" +
|
"\rVerifyRequest\x12\x1a\n" +
|
||||||
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
||||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"{\n" +
|
"\bpassword\x18\x02 \x01(\tR\bpassword\"v\n" +
|
||||||
"\x0eVerifyResponse\x12\x18\n" +
|
"\x0eVerifyResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
||||||
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12*\n" +
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12%\n" +
|
||||||
"\x04user\x18\x03 \x01(\v2\x16.ldap_auth.v1.UserDataR\x04user2Z\n" +
|
"\x04user\x18\x03 \x01(\v2\x11.ldap.v1.UserDataR\x04user2Z\n" +
|
||||||
"\x0fLdapAuthService\x12G\n" +
|
"\x0fLdapAuthService\x12G\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"VerifyUser\x12\x1b.ldap_auth.v1.VerifyRequest\x1a\x1c.ldap_auth.v1.VerifyResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
"VerifyUser\x12\x1b.ldap_auth.v1.VerifyRequest\x1a\x1c.ldap_auth.v1.VerifyResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||||
@@ -272,16 +163,16 @@ func file_ldap_auth_proto_rawDescGZIP() []byte {
|
|||||||
return file_ldap_auth_proto_rawDescData
|
return file_ldap_auth_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
var file_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_ldap_auth_proto_goTypes = []any{
|
var file_ldap_auth_proto_goTypes = []any{
|
||||||
(*UserData)(nil), // 0: ldap_auth.v1.UserData
|
(*VerifyRequest)(nil), // 0: ldap_auth.v1.VerifyRequest
|
||||||
(*VerifyRequest)(nil), // 1: ldap_auth.v1.VerifyRequest
|
(*VerifyResponse)(nil), // 1: ldap_auth.v1.VerifyResponse
|
||||||
(*VerifyResponse)(nil), // 2: ldap_auth.v1.VerifyResponse
|
(*UserData)(nil), // 2: ldap.v1.UserData
|
||||||
}
|
}
|
||||||
var file_ldap_auth_proto_depIdxs = []int32{
|
var file_ldap_auth_proto_depIdxs = []int32{
|
||||||
0, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap_auth.v1.UserData
|
2, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap.v1.UserData
|
||||||
1, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
0, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
||||||
2, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
1, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
||||||
2, // [2:3] is the sub-list for method output_type
|
2, // [2:3] is the sub-list for method output_type
|
||||||
1, // [1:2] is the sub-list for method input_type
|
1, // [1:2] is the sub-list for method input_type
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
@@ -294,13 +185,14 @@ func file_ldap_auth_proto_init() {
|
|||||||
if File_ldap_auth_proto != nil {
|
if File_ldap_auth_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
file_ldap_proto_init()
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ldap_auth_proto_rawDesc), len(file_ldap_auth_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ldap_auth_proto_rawDesc), len(file_ldap_auth_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 3,
|
NumMessages: 2,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ type UserData struct {
|
|||||||
Avatar []byte `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // Аватарка в байтах (thumbnailPhoto)
|
Avatar []byte `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // Аватарка в байтах (thumbnailPhoto)
|
||||||
Groups []string `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"` // Список групп
|
Groups []string `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"` // Список групп
|
||||||
IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Статус аккаунта
|
IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Статус аккаунта
|
||||||
|
Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -214,6 +215,13 @@ func (x *UserData) GetIsActive() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UserData) GetPhone() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Phone
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// Модель группы
|
// Модель группы
|
||||||
type GroupData struct {
|
type GroupData struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
@@ -700,7 +708,7 @@ const file_ldap_proto_rawDesc = "" +
|
|||||||
"\fEmptyRequest\"O\n" +
|
"\fEmptyRequest\"O\n" +
|
||||||
"\x0eStatusResponse\x12\x18\n" +
|
"\x0eStatusResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
||||||
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\"\xde\x01\n" +
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\"\xf4\x01\n" +
|
||||||
"\bUserData\x12\x0e\n" +
|
"\bUserData\x12\x0e\n" +
|
||||||
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x1a\n" +
|
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x1a\n" +
|
||||||
"\busername\x18\x02 \x01(\tR\busername\x12!\n" +
|
"\busername\x18\x02 \x01(\tR\busername\x12!\n" +
|
||||||
@@ -709,7 +717,8 @@ const file_ldap_proto_rawDesc = "" +
|
|||||||
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x16\n" +
|
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x16\n" +
|
||||||
"\x06avatar\x18\x06 \x01(\fR\x06avatar\x12\x16\n" +
|
"\x06avatar\x18\x06 \x01(\fR\x06avatar\x12\x16\n" +
|
||||||
"\x06groups\x18\a \x03(\tR\x06groups\x12\x1b\n" +
|
"\x06groups\x18\a \x03(\tR\x06groups\x12\x1b\n" +
|
||||||
"\tis_active\x18\b \x01(\bR\bisActive\"/\n" +
|
"\tis_active\x18\b \x01(\bR\bisActive\x12\x14\n" +
|
||||||
|
"\x05phone\x18\t \x01(\tR\x05phone\"/\n" +
|
||||||
"\tGroupData\x12\x0e\n" +
|
"\tGroupData\x12\x0e\n" +
|
||||||
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x12\n" +
|
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x12\n" +
|
||||||
"\x04name\x18\x02 \x01(\tR\x04name\"z\n" +
|
"\x04name\x18\x02 \x01(\tR\x04name\"z\n" +
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ func (x *Verify2FaRequest) GetTelegramCode() string {
|
|||||||
type Verify2FaResponse struct {
|
type Verify2FaResponse struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
|
||||||
RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
|
||||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||||
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
|
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
|
||||||
ReserveCodes []string `protobuf:"bytes,5,rep,name=reserve_codes,json=reserveCodes,proto3" json:"reserve_codes,omitempty"`
|
ReserveCodes []string `protobuf:"bytes,5,rep,name=reserve_codes,json=reserveCodes,proto3" json:"reserve_codes,omitempty"`
|
||||||
@@ -129,13 +128,6 @@ func (x *Verify2FaResponse) GetAccessToken() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Verify2FaResponse) GetRefreshToken() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.RefreshToken
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Verify2FaResponse) GetStatus() string {
|
func (x *Verify2FaResponse) GetStatus() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Status
|
return x.Status
|
||||||
@@ -969,10 +961,9 @@ const file_twofa_proto_rawDesc = "" +
|
|||||||
"\rtelegram_code\x18\x03 \x01(\tH\x01R\ftelegramCode\x88\x01\x01B\f\n" +
|
"\rtelegram_code\x18\x03 \x01(\tH\x01R\ftelegramCode\x88\x01\x01B\f\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"_totp_codeB\x10\n" +
|
"_totp_codeB\x10\n" +
|
||||||
"\x0e_telegram_code\"\xb2\x01\n" +
|
"\x0e_telegram_code\"\x8d\x01\n" +
|
||||||
"\x11Verify2FaResponse\x12!\n" +
|
"\x11Verify2FaResponse\x12!\n" +
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" +
|
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12\x16\n" +
|
||||||
"\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\x12\x16\n" +
|
|
||||||
"\x06status\x18\x03 \x01(\tR\x06status\x12\x18\n" +
|
"\x06status\x18\x03 \x01(\tR\x06status\x12\x18\n" +
|
||||||
"\amessage\x18\x04 \x01(\tR\amessage\x12#\n" +
|
"\amessage\x18\x04 \x01(\tR\amessage\x12#\n" +
|
||||||
"\rreserve_codes\x18\x05 \x03(\tR\freserveCodes\"?\n" +
|
"\rreserve_codes\x18\x05 \x03(\tR\freserveCodes\"?\n" +
|
||||||
|
|||||||
@@ -8,29 +8,10 @@
|
|||||||
import type { Metadata } from "@grpc/grpc-js";
|
import type { Metadata } from "@grpc/grpc-js";
|
||||||
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
|
import { UserData } from "./ldap";
|
||||||
|
|
||||||
export const protobufPackage = "ldap_auth.v1";
|
export const protobufPackage = "ldap_auth.v1";
|
||||||
|
|
||||||
/** Полная модель пользователя */
|
|
||||||
export interface UserData {
|
|
||||||
/** Полный путь в AD (Distinguished Name) */
|
|
||||||
dn: string;
|
|
||||||
/** Логин (sAMAccountName) */
|
|
||||||
username: string;
|
|
||||||
/** ФИО (displayName) */
|
|
||||||
displayName: string;
|
|
||||||
/** Почта (mail) */
|
|
||||||
email: string;
|
|
||||||
/** Описание/Должность (description) */
|
|
||||||
description: string;
|
|
||||||
/** Аватарка в байтах (thumbnailPhoto) */
|
|
||||||
avatar: Uint8Array;
|
|
||||||
/** Список групп */
|
|
||||||
groups: string[];
|
|
||||||
/** Статус аккаунта */
|
|
||||||
isActive: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** --- Авторизация --- */
|
/** --- Авторизация --- */
|
||||||
export interface VerifyRequest {
|
export interface VerifyRequest {
|
||||||
username: string;
|
username: string;
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export interface UserData {
|
|||||||
groups: string[];
|
groups: string[];
|
||||||
/** Статус аккаунта */
|
/** Статус аккаунта */
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
phone: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Модель группы */
|
/** Модель группы */
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export interface Verify2FaRequest {
|
|||||||
|
|
||||||
export interface Verify2FaResponse {
|
export interface Verify2FaResponse {
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
refreshToken: string;
|
|
||||||
status: string;
|
status: string;
|
||||||
message: string;
|
message: string;
|
||||||
reserveCodes: string[];
|
reserveCodes: string[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.30",
|
"version": "1.0.48",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package account;
|
package account.v1;
|
||||||
|
|
||||||
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
||||||
|
|
||||||
service AccountService {
|
service AccountService {
|
||||||
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
||||||
|
rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse);
|
||||||
|
rpc ChangeData(ChangeDataRequest) returns (ChangeDataResponse);
|
||||||
|
rpc SetPin (SetPinRequest) returns (SetPinResponse);
|
||||||
|
rpc UnlockPin (UnlockPinRequest) returns (UnlockPinResponse);
|
||||||
|
rpc GetPinStatus (GetPinStatusRequest) returns (GetPinStatusResponse);
|
||||||
|
rpc RemovePin (RemovePinRequest) returns (RemovePinResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetAccountRequest {
|
message GetAccountRequest {
|
||||||
@@ -23,7 +29,7 @@ message GetAccountResponse {
|
|||||||
repeated string roles = 8;
|
repeated string roles = 8;
|
||||||
string avatar_url = 9;
|
string avatar_url = 9;
|
||||||
optional string employee_id = 10;
|
optional string employee_id = 10;
|
||||||
Presence presence = 11;
|
string presence = 11;
|
||||||
string last_active = 12;
|
string last_active = 12;
|
||||||
string custom_status_text = 13;
|
string custom_status_text = 13;
|
||||||
string custom_status_emoji = 14;
|
string custom_status_emoji = 14;
|
||||||
@@ -33,9 +39,76 @@ message GetAccountResponse {
|
|||||||
bool has_pin = 18;
|
bool has_pin = 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Presence {
|
message ChangePasswordRequest {
|
||||||
PRESENCE_UNSPECIFIED = 0;
|
string user_id = 1;
|
||||||
OFFLINE = 1;
|
string old_password = 3;
|
||||||
ONLINE = 2;
|
string new_password = 4;
|
||||||
|
optional string code = 5;
|
||||||
|
string session_id = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ChangePasswordResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string message = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChangeDataRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string session_id = 2;
|
||||||
|
optional string email = 3;
|
||||||
|
optional string phone = 4;
|
||||||
|
optional string full_name = 5;
|
||||||
|
optional string avatar_url = 6;
|
||||||
|
optional string custom_status_text = 7;
|
||||||
|
optional string custom_status_emoji = 8;
|
||||||
|
optional string timezone = 9;
|
||||||
|
optional string language = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChangeDataResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string message = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetPinRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string session_id = 2;
|
||||||
|
string pin = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetPinResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string message = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnlockPinRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string session_id = 2;
|
||||||
|
string pin = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnlockPinResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string message = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetPinStatusRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string session_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetPinStatusResponse {
|
||||||
|
bool has_pin = 1;
|
||||||
|
bool is_locked = 2;
|
||||||
|
string lock_until = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemovePinRequest {
|
||||||
|
string pin = 1;
|
||||||
|
string user_id = 2;
|
||||||
|
string session_id=3;
|
||||||
|
}
|
||||||
|
message RemovePinResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string message = 2;
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ service AuthService {
|
|||||||
rpc VerifyToken (VerifyTokenRequest) returns (VerifyTokenResponse);
|
rpc VerifyToken (VerifyTokenRequest) returns (VerifyTokenResponse);
|
||||||
rpc GetAccountRoleLevel (GetAccountRoleLevelRequest) returns (GetAccountRoleLevelResponse);
|
rpc GetAccountRoleLevel (GetAccountRoleLevelRequest) returns (GetAccountRoleLevelResponse);
|
||||||
rpc Logout (LogoutRequest) returns (LogoutResponse);
|
rpc Logout (LogoutRequest) returns (LogoutResponse);
|
||||||
rpc LogoutAll (LogoutRequest) returns (LogoutResponse);
|
rpc LogoutOther (LogoutRequest) returns (LogoutResponse);
|
||||||
rpc UnlockPin (UnlockPinRequest) returns (UnlockPinResponse);
|
rpc GetSessions(GetSessionRequest) returns (GetSessionsResponse);
|
||||||
|
rpc TerminateSession(TerminateSessionRequest) returns (TerminateSessionResponse);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +41,8 @@ message RefreshResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message LogoutRequest {
|
message LogoutRequest {
|
||||||
string access_token = 1;
|
string user_id = 1;
|
||||||
|
string session_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message LogoutResponse {
|
message LogoutResponse {
|
||||||
@@ -72,12 +74,29 @@ message GetAccountRoleLevelResponse {
|
|||||||
int32 role_level = 2;
|
int32 role_level = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UnlockPinRequest {
|
message GetSessionRequest {
|
||||||
string access_token = 1;
|
string user_id = 1;
|
||||||
string pin_code = 2;
|
string current_session_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UnlockPinResponse {
|
message SessionItem {
|
||||||
|
string id = 1; // Здесь будет лежать захэшированный ID
|
||||||
|
string ip_address = 2;
|
||||||
|
string user_agent = 3;
|
||||||
|
int64 last_activity = 4; // Unix timestamp в миллисекундах
|
||||||
|
bool is_current = 5; // Флаг текущей сессии
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSessionsResponse {
|
||||||
|
repeated SessionItem sessions = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TerminateSessionRequest {
|
||||||
|
string user_id = 1;
|
||||||
|
string target_hash = 2; // Хэш сессии, которую нужно убить
|
||||||
|
}
|
||||||
|
|
||||||
|
message TerminateSessionResponse {
|
||||||
bool success = 1;
|
bool success = 1;
|
||||||
string message = 2;
|
string message = 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ message UserData {
|
|||||||
bytes avatar = 6; // Аватарка в байтах (thumbnailPhoto)
|
bytes avatar = 6; // Аватарка в байтах (thumbnailPhoto)
|
||||||
repeated string groups = 7; // Список групп
|
repeated string groups = 7; // Список групп
|
||||||
bool is_active = 8; // Статус аккаунта
|
bool is_active = 8; // Статус аккаунта
|
||||||
|
string phone = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Модель группы
|
// Модель группы
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ message Verify2FaRequest {
|
|||||||
|
|
||||||
message Verify2FaResponse {
|
message Verify2FaResponse {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
string refresh_token = 2;
|
|
||||||
string status = 3;
|
string status = 3;
|
||||||
string message = 4;
|
string message = 4;
|
||||||
repeated string reserve_codes = 5;
|
repeated string reserve_codes = 5;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
|
|
||||||
export const PROTO_PATHS = {
|
export const PROTO_PATHS = {
|
||||||
AUTH: join(__dirname, "../../proto/identity.proto"),
|
AUTH: join(__dirname, "../../proto/auth.proto"),
|
||||||
|
LDAP_AUTH: join(__dirname, "../../proto/ldap-auth.proto"),
|
||||||
|
ACCOUNT: join(__dirname, "../../proto/account.proto"),
|
||||||
|
TWOFA: join(__dirname, "../../proto/twofa.proto"),
|
||||||
LDAP: join(__dirname, "../../proto/ldap.proto"),
|
LDAP: join(__dirname, "../../proto/ldap.proto"),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user