From 7d3c064ed83487d2a170cb7775daa93e7e89f87c Mon Sep 17 00:00:00 2001 From: Kaien Date: Wed, 15 Apr 2026 14:09:29 +0300 Subject: [PATCH] feat: add Steam and VK auth RPCs to AuthService proto Add GetSteamAuthURL/ExchangeSteamLogin (OpenID 2.0) and GetVKOAuthURL/ExchangeVKCode (OAuth 2.0) RPCs with corresponding request message types. Co-Authored-By: Claude Sonnet 4.6 --- auth.pb.go | 405 ++++++++++++++++++++++++++++++++++++++---------- auth.proto | 35 +++++ auth_grpc.pb.go | 164 +++++++++++++++++++- 3 files changed, 518 insertions(+), 86 deletions(-) diff --git a/auth.pb.go b/auth.pb.go index 812f4a9..8aa6e01 100644 --- a/auth.pb.go +++ b/auth.pb.go @@ -2,7 +2,7 @@ // versions: // protoc-gen-go v1.36.11 // protoc v7.34.0 -// source: proto/l-ai-core-proto/auth.proto +// source: auth.proto package proto @@ -31,7 +31,7 @@ type TelegramTokenRequest struct { func (x *TelegramTokenRequest) Reset() { *x = TelegramTokenRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[0] + mi := &file_auth_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -43,7 +43,7 @@ func (x *TelegramTokenRequest) String() string { func (*TelegramTokenRequest) ProtoMessage() {} func (x *TelegramTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[0] + mi := &file_auth_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -56,7 +56,7 @@ func (x *TelegramTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TelegramTokenRequest.ProtoReflect.Descriptor instead. func (*TelegramTokenRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{0} + return file_auth_proto_rawDescGZIP(), []int{0} } func (x *TelegramTokenRequest) GetIdToken() string { @@ -82,7 +82,7 @@ type TelegramAuthRequest struct { func (x *TelegramAuthRequest) Reset() { *x = TelegramAuthRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[1] + mi := &file_auth_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -94,7 +94,7 @@ func (x *TelegramAuthRequest) String() string { func (*TelegramAuthRequest) ProtoMessage() {} func (x *TelegramAuthRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[1] + mi := &file_auth_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -107,7 +107,7 @@ func (x *TelegramAuthRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TelegramAuthRequest.ProtoReflect.Descriptor instead. func (*TelegramAuthRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{1} + return file_auth_proto_rawDescGZIP(), []int{1} } func (x *TelegramAuthRequest) GetId() int64 { @@ -169,7 +169,7 @@ type GetDiscordOAuthURLRequest struct { func (x *GetDiscordOAuthURLRequest) Reset() { *x = GetDiscordOAuthURLRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[2] + mi := &file_auth_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -181,7 +181,7 @@ func (x *GetDiscordOAuthURLRequest) String() string { func (*GetDiscordOAuthURLRequest) ProtoMessage() {} func (x *GetDiscordOAuthURLRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[2] + mi := &file_auth_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -194,7 +194,7 @@ func (x *GetDiscordOAuthURLRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetDiscordOAuthURLRequest.ProtoReflect.Descriptor instead. func (*GetDiscordOAuthURLRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{2} + return file_auth_proto_rawDescGZIP(), []int{2} } func (x *GetDiscordOAuthURLRequest) GetRedirectUri() string { @@ -215,7 +215,7 @@ type OAuthURLResponse struct { func (x *OAuthURLResponse) Reset() { *x = OAuthURLResponse{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[3] + mi := &file_auth_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -227,7 +227,7 @@ func (x *OAuthURLResponse) String() string { func (*OAuthURLResponse) ProtoMessage() {} func (x *OAuthURLResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[3] + mi := &file_auth_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -240,7 +240,7 @@ func (x *OAuthURLResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OAuthURLResponse.ProtoReflect.Descriptor instead. func (*OAuthURLResponse) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{3} + return file_auth_proto_rawDescGZIP(), []int{3} } func (x *OAuthURLResponse) GetUrl() string { @@ -269,7 +269,7 @@ type DiscordExchangeRequest struct { func (x *DiscordExchangeRequest) Reset() { *x = DiscordExchangeRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[4] + mi := &file_auth_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -281,7 +281,7 @@ func (x *DiscordExchangeRequest) String() string { func (*DiscordExchangeRequest) ProtoMessage() {} func (x *DiscordExchangeRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[4] + mi := &file_auth_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -294,7 +294,7 @@ func (x *DiscordExchangeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DiscordExchangeRequest.ProtoReflect.Descriptor instead. func (*DiscordExchangeRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{4} + return file_auth_proto_rawDescGZIP(), []int{4} } func (x *DiscordExchangeRequest) GetCode() string { @@ -318,6 +318,210 @@ func (x *DiscordExchangeRequest) GetRedirectUri() string { return "" } +// GetSteamAuthURLRequest — caller provides the redirect_uri for their service +type GetSteamAuthURLRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RedirectUri string `protobuf:"bytes,1,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSteamAuthURLRequest) Reset() { + *x = GetSteamAuthURLRequest{} + mi := &file_auth_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSteamAuthURLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSteamAuthURLRequest) ProtoMessage() {} + +func (x *GetSteamAuthURLRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 GetSteamAuthURLRequest.ProtoReflect.Descriptor instead. +func (*GetSteamAuthURLRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{5} +} + +func (x *GetSteamAuthURLRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +// SteamExchangeRequest — all OpenID 2.0 params received in the Steam callback +type SteamExchangeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + OpenidParams map[string]string `protobuf:"bytes,2,rep,name=openid_params,json=openidParams,proto3" json:"openid_params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SteamExchangeRequest) Reset() { + *x = SteamExchangeRequest{} + mi := &file_auth_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SteamExchangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SteamExchangeRequest) ProtoMessage() {} + +func (x *SteamExchangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 SteamExchangeRequest.ProtoReflect.Descriptor instead. +func (*SteamExchangeRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{6} +} + +func (x *SteamExchangeRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *SteamExchangeRequest) GetOpenidParams() map[string]string { + if x != nil { + return x.OpenidParams + } + return nil +} + +// GetVKOAuthURLRequest — caller provides the redirect_uri for their service +type GetVKOAuthURLRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RedirectUri string `protobuf:"bytes,1,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetVKOAuthURLRequest) Reset() { + *x = GetVKOAuthURLRequest{} + mi := &file_auth_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetVKOAuthURLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVKOAuthURLRequest) ProtoMessage() {} + +func (x *GetVKOAuthURLRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 GetVKOAuthURLRequest.ProtoReflect.Descriptor instead. +func (*GetVKOAuthURLRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{7} +} + +func (x *GetVKOAuthURLRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +// VKExchangeRequest — exchange code received in VK callback +type VKExchangeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + RedirectUri string `protobuf:"bytes,3,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VKExchangeRequest) Reset() { + *x = VKExchangeRequest{} + mi := &file_auth_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VKExchangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VKExchangeRequest) ProtoMessage() {} + +func (x *VKExchangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 VKExchangeRequest.ProtoReflect.Descriptor instead. +func (*VKExchangeRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{8} +} + +func (x *VKExchangeRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *VKExchangeRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *VKExchangeRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + // AuthResponse is returned after successful authentication type AuthResponse struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -332,7 +536,7 @@ type AuthResponse struct { func (x *AuthResponse) Reset() { *x = AuthResponse{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[5] + mi := &file_auth_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -344,7 +548,7 @@ func (x *AuthResponse) String() string { func (*AuthResponse) ProtoMessage() {} func (x *AuthResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[5] + mi := &file_auth_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -357,7 +561,7 @@ func (x *AuthResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead. func (*AuthResponse) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{5} + return file_auth_proto_rawDescGZIP(), []int{9} } func (x *AuthResponse) GetAccessToken() string { @@ -404,7 +608,7 @@ type RefreshTokenRequest struct { func (x *RefreshTokenRequest) Reset() { *x = RefreshTokenRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[6] + mi := &file_auth_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -416,7 +620,7 @@ func (x *RefreshTokenRequest) String() string { func (*RefreshTokenRequest) ProtoMessage() {} func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[6] + mi := &file_auth_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -429,7 +633,7 @@ func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead. func (*RefreshTokenRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{6} + return file_auth_proto_rawDescGZIP(), []int{10} } func (x *RefreshTokenRequest) GetRefreshToken() string { @@ -448,7 +652,7 @@ type RevokeTokenRequest struct { func (x *RevokeTokenRequest) Reset() { *x = RevokeTokenRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[7] + mi := &file_auth_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -460,7 +664,7 @@ func (x *RevokeTokenRequest) String() string { func (*RevokeTokenRequest) ProtoMessage() {} func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[7] + mi := &file_auth_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -473,7 +677,7 @@ func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeTokenRequest.ProtoReflect.Descriptor instead. func (*RevokeTokenRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{7} + return file_auth_proto_rawDescGZIP(), []int{11} } func (x *RevokeTokenRequest) GetToken() string { @@ -492,7 +696,7 @@ type RevokeTokenResponse struct { func (x *RevokeTokenResponse) Reset() { *x = RevokeTokenResponse{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[8] + mi := &file_auth_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -504,7 +708,7 @@ func (x *RevokeTokenResponse) String() string { func (*RevokeTokenResponse) ProtoMessage() {} func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[8] + mi := &file_auth_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -517,7 +721,7 @@ func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeTokenResponse.ProtoReflect.Descriptor instead. func (*RevokeTokenResponse) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{8} + return file_auth_proto_rawDescGZIP(), []int{12} } func (x *RevokeTokenResponse) GetSuccess() bool { @@ -536,7 +740,7 @@ type ValidateTokenRequest struct { func (x *ValidateTokenRequest) Reset() { *x = ValidateTokenRequest{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[9] + mi := &file_auth_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -548,7 +752,7 @@ func (x *ValidateTokenRequest) String() string { func (*ValidateTokenRequest) ProtoMessage() {} func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[9] + mi := &file_auth_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -561,7 +765,7 @@ func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead. func (*ValidateTokenRequest) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{9} + return file_auth_proto_rawDescGZIP(), []int{13} } func (x *ValidateTokenRequest) GetToken() string { @@ -583,7 +787,7 @@ type ValidateTokenResponse struct { func (x *ValidateTokenResponse) Reset() { *x = ValidateTokenResponse{} - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[10] + mi := &file_auth_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -595,7 +799,7 @@ func (x *ValidateTokenResponse) String() string { func (*ValidateTokenResponse) ProtoMessage() {} func (x *ValidateTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_l_ai_core_proto_auth_proto_msgTypes[10] + mi := &file_auth_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -608,7 +812,7 @@ func (x *ValidateTokenResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateTokenResponse.ProtoReflect.Descriptor instead. func (*ValidateTokenResponse) Descriptor() ([]byte, []int) { - return file_proto_l_ai_core_proto_auth_proto_rawDescGZIP(), []int{10} + return file_auth_proto_rawDescGZIP(), []int{14} } func (x *ValidateTokenResponse) GetValid() bool { @@ -639,11 +843,12 @@ func (x *ValidateTokenResponse) GetLinkedPlatforms() []string { return nil } -var File_proto_l_ai_core_proto_auth_proto protoreflect.FileDescriptor +var File_auth_proto protoreflect.FileDescriptor -const file_proto_l_ai_core_proto_auth_proto_rawDesc = "" + +const file_auth_proto_rawDesc = "" + "\n" + - " proto/l-ai-core-proto/auth.proto\x12\x04auth\"1\n" + + "\n" + + "auth.proto\x12\x04auth\"1\n" + "\x14TelegramTokenRequest\x12\x19\n" + "\bid_token\x18\x01 \x01(\tR\aidToken\"\xcb\x01\n" + "\x13TelegramAuthRequest\x12\x0e\n" + @@ -663,6 +868,20 @@ const file_proto_l_ai_core_proto_auth_proto_rawDesc = "" + "\x16DiscordExchangeRequest\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\x12\x14\n" + "\x05state\x18\x02 \x01(\tR\x05state\x12!\n" + + "\fredirect_uri\x18\x03 \x01(\tR\vredirectUri\";\n" + + "\x16GetSteamAuthURLRequest\x12!\n" + + "\fredirect_uri\x18\x01 \x01(\tR\vredirectUri\"\xc0\x01\n" + + "\x14SteamExchangeRequest\x12\x14\n" + + "\x05state\x18\x01 \x01(\tR\x05state\x12Q\n" + + "\ropenid_params\x18\x02 \x03(\v2,.auth.SteamExchangeRequest.OpenidParamsEntryR\fopenidParams\x1a?\n" + + "\x11OpenidParamsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"9\n" + + "\x14GetVKOAuthURLRequest\x12!\n" + + "\fredirect_uri\x18\x01 \x01(\tR\vredirectUri\"`\n" + + "\x11VKExchangeRequest\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x14\n" + + "\x05state\x18\x02 \x01(\tR\x05state\x12!\n" + "\fredirect_uri\x18\x03 \x01(\tR\vredirectUri\"\xbe\x01\n" + "\fAuthResponse\x12!\n" + "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" + @@ -683,84 +902,102 @@ const file_proto_l_ai_core_proto_auth_proto_rawDesc = "" + "\x05valid\x18\x01 \x01(\bR\x05valid\x12$\n" + "\x0eglobal_user_id\x18\x02 \x01(\x03R\fglobalUserId\x12!\n" + "\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12)\n" + - "\x10linked_platforms\x18\x04 \x03(\tR\x0flinkedPlatforms2\xfe\x03\n" + + "\x10linked_platforms\x18\x04 \x03(\tR\x0flinkedPlatforms2\x91\x06\n" + "\vAuthService\x12A\n" + "\x10AuthWithTelegram\x12\x19.auth.TelegramAuthRequest\x1a\x12.auth.AuthResponse\x12G\n" + "\x15AuthWithTelegramToken\x12\x1a.auth.TelegramTokenRequest\x1a\x12.auth.AuthResponse\x12M\n" + "\x12GetDiscordOAuthURL\x12\x1f.auth.GetDiscordOAuthURLRequest\x1a\x16.auth.OAuthURLResponse\x12G\n" + - "\x13ExchangeDiscordCode\x12\x1c.auth.DiscordExchangeRequest\x1a\x12.auth.AuthResponse\x12=\n" + + "\x13ExchangeDiscordCode\x12\x1c.auth.DiscordExchangeRequest\x1a\x12.auth.AuthResponse\x12G\n" + + "\x0fGetSteamAuthURL\x12\x1c.auth.GetSteamAuthURLRequest\x1a\x16.auth.OAuthURLResponse\x12D\n" + + "\x12ExchangeSteamLogin\x12\x1a.auth.SteamExchangeRequest\x1a\x12.auth.AuthResponse\x12C\n" + + "\rGetVKOAuthURL\x12\x1a.auth.GetVKOAuthURLRequest\x1a\x16.auth.OAuthURLResponse\x12=\n" + + "\x0eExchangeVKCode\x12\x17.auth.VKExchangeRequest\x1a\x12.auth.AuthResponse\x12=\n" + "\fRefreshToken\x12\x19.auth.RefreshTokenRequest\x1a\x12.auth.AuthResponse\x12B\n" + "\vRevokeToken\x12\x18.auth.RevokeTokenRequest\x1a\x19.auth.RevokeTokenResponse\x12H\n" + "\rValidateToken\x12\x1a.auth.ValidateTokenRequest\x1a\x1b.auth.ValidateTokenResponseB(Z&ai_service/proto/l-ai-core-proto;protob\x06proto3" var ( - file_proto_l_ai_core_proto_auth_proto_rawDescOnce sync.Once - file_proto_l_ai_core_proto_auth_proto_rawDescData []byte + file_auth_proto_rawDescOnce sync.Once + file_auth_proto_rawDescData []byte ) -func file_proto_l_ai_core_proto_auth_proto_rawDescGZIP() []byte { - file_proto_l_ai_core_proto_auth_proto_rawDescOnce.Do(func() { - file_proto_l_ai_core_proto_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_l_ai_core_proto_auth_proto_rawDesc), len(file_proto_l_ai_core_proto_auth_proto_rawDesc))) +func file_auth_proto_rawDescGZIP() []byte { + file_auth_proto_rawDescOnce.Do(func() { + file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc))) }) - return file_proto_l_ai_core_proto_auth_proto_rawDescData + return file_auth_proto_rawDescData } -var file_proto_l_ai_core_proto_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_proto_l_ai_core_proto_auth_proto_goTypes = []any{ +var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_auth_proto_goTypes = []any{ (*TelegramTokenRequest)(nil), // 0: auth.TelegramTokenRequest (*TelegramAuthRequest)(nil), // 1: auth.TelegramAuthRequest (*GetDiscordOAuthURLRequest)(nil), // 2: auth.GetDiscordOAuthURLRequest (*OAuthURLResponse)(nil), // 3: auth.OAuthURLResponse (*DiscordExchangeRequest)(nil), // 4: auth.DiscordExchangeRequest - (*AuthResponse)(nil), // 5: auth.AuthResponse - (*RefreshTokenRequest)(nil), // 6: auth.RefreshTokenRequest - (*RevokeTokenRequest)(nil), // 7: auth.RevokeTokenRequest - (*RevokeTokenResponse)(nil), // 8: auth.RevokeTokenResponse - (*ValidateTokenRequest)(nil), // 9: auth.ValidateTokenRequest - (*ValidateTokenResponse)(nil), // 10: auth.ValidateTokenResponse + (*GetSteamAuthURLRequest)(nil), // 5: auth.GetSteamAuthURLRequest + (*SteamExchangeRequest)(nil), // 6: auth.SteamExchangeRequest + (*GetVKOAuthURLRequest)(nil), // 7: auth.GetVKOAuthURLRequest + (*VKExchangeRequest)(nil), // 8: auth.VKExchangeRequest + (*AuthResponse)(nil), // 9: auth.AuthResponse + (*RefreshTokenRequest)(nil), // 10: auth.RefreshTokenRequest + (*RevokeTokenRequest)(nil), // 11: auth.RevokeTokenRequest + (*RevokeTokenResponse)(nil), // 12: auth.RevokeTokenResponse + (*ValidateTokenRequest)(nil), // 13: auth.ValidateTokenRequest + (*ValidateTokenResponse)(nil), // 14: auth.ValidateTokenResponse + nil, // 15: auth.SteamExchangeRequest.OpenidParamsEntry } -var file_proto_l_ai_core_proto_auth_proto_depIdxs = []int32{ - 1, // 0: auth.AuthService.AuthWithTelegram:input_type -> auth.TelegramAuthRequest - 0, // 1: auth.AuthService.AuthWithTelegramToken:input_type -> auth.TelegramTokenRequest - 2, // 2: auth.AuthService.GetDiscordOAuthURL:input_type -> auth.GetDiscordOAuthURLRequest - 4, // 3: auth.AuthService.ExchangeDiscordCode:input_type -> auth.DiscordExchangeRequest - 6, // 4: auth.AuthService.RefreshToken:input_type -> auth.RefreshTokenRequest - 7, // 5: auth.AuthService.RevokeToken:input_type -> auth.RevokeTokenRequest - 9, // 6: auth.AuthService.ValidateToken:input_type -> auth.ValidateTokenRequest - 5, // 7: auth.AuthService.AuthWithTelegram:output_type -> auth.AuthResponse - 5, // 8: auth.AuthService.AuthWithTelegramToken:output_type -> auth.AuthResponse - 3, // 9: auth.AuthService.GetDiscordOAuthURL:output_type -> auth.OAuthURLResponse - 5, // 10: auth.AuthService.ExchangeDiscordCode:output_type -> auth.AuthResponse - 5, // 11: auth.AuthService.RefreshToken:output_type -> auth.AuthResponse - 8, // 12: auth.AuthService.RevokeToken:output_type -> auth.RevokeTokenResponse - 10, // 13: auth.AuthService.ValidateToken:output_type -> auth.ValidateTokenResponse - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] 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 +var file_auth_proto_depIdxs = []int32{ + 15, // 0: auth.SteamExchangeRequest.openid_params:type_name -> auth.SteamExchangeRequest.OpenidParamsEntry + 1, // 1: auth.AuthService.AuthWithTelegram:input_type -> auth.TelegramAuthRequest + 0, // 2: auth.AuthService.AuthWithTelegramToken:input_type -> auth.TelegramTokenRequest + 2, // 3: auth.AuthService.GetDiscordOAuthURL:input_type -> auth.GetDiscordOAuthURLRequest + 4, // 4: auth.AuthService.ExchangeDiscordCode:input_type -> auth.DiscordExchangeRequest + 5, // 5: auth.AuthService.GetSteamAuthURL:input_type -> auth.GetSteamAuthURLRequest + 6, // 6: auth.AuthService.ExchangeSteamLogin:input_type -> auth.SteamExchangeRequest + 7, // 7: auth.AuthService.GetVKOAuthURL:input_type -> auth.GetVKOAuthURLRequest + 8, // 8: auth.AuthService.ExchangeVKCode:input_type -> auth.VKExchangeRequest + 10, // 9: auth.AuthService.RefreshToken:input_type -> auth.RefreshTokenRequest + 11, // 10: auth.AuthService.RevokeToken:input_type -> auth.RevokeTokenRequest + 13, // 11: auth.AuthService.ValidateToken:input_type -> auth.ValidateTokenRequest + 9, // 12: auth.AuthService.AuthWithTelegram:output_type -> auth.AuthResponse + 9, // 13: auth.AuthService.AuthWithTelegramToken:output_type -> auth.AuthResponse + 3, // 14: auth.AuthService.GetDiscordOAuthURL:output_type -> auth.OAuthURLResponse + 9, // 15: auth.AuthService.ExchangeDiscordCode:output_type -> auth.AuthResponse + 3, // 16: auth.AuthService.GetSteamAuthURL:output_type -> auth.OAuthURLResponse + 9, // 17: auth.AuthService.ExchangeSteamLogin:output_type -> auth.AuthResponse + 3, // 18: auth.AuthService.GetVKOAuthURL:output_type -> auth.OAuthURLResponse + 9, // 19: auth.AuthService.ExchangeVKCode:output_type -> auth.AuthResponse + 9, // 20: auth.AuthService.RefreshToken:output_type -> auth.AuthResponse + 12, // 21: auth.AuthService.RevokeToken:output_type -> auth.RevokeTokenResponse + 14, // 22: auth.AuthService.ValidateToken:output_type -> auth.ValidateTokenResponse + 12, // [12:23] is the sub-list for method output_type + 1, // [1:12] 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_proto_l_ai_core_proto_auth_proto_init() } -func file_proto_l_ai_core_proto_auth_proto_init() { - if File_proto_l_ai_core_proto_auth_proto != nil { +func init() { file_auth_proto_init() } +func file_auth_proto_init() { + if File_auth_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_l_ai_core_proto_auth_proto_rawDesc), len(file_proto_l_ai_core_proto_auth_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)), NumEnums: 0, - NumMessages: 11, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_proto_l_ai_core_proto_auth_proto_goTypes, - DependencyIndexes: file_proto_l_ai_core_proto_auth_proto_depIdxs, - MessageInfos: file_proto_l_ai_core_proto_auth_proto_msgTypes, + GoTypes: file_auth_proto_goTypes, + DependencyIndexes: file_auth_proto_depIdxs, + MessageInfos: file_auth_proto_msgTypes, }.Build() - File_proto_l_ai_core_proto_auth_proto = out.File - file_proto_l_ai_core_proto_auth_proto_goTypes = nil - file_proto_l_ai_core_proto_auth_proto_depIdxs = nil + File_auth_proto = out.File + file_auth_proto_goTypes = nil + file_auth_proto_depIdxs = nil } diff --git a/auth.proto b/auth.proto index 52714f2..e646bb0 100644 --- a/auth.proto +++ b/auth.proto @@ -19,6 +19,18 @@ service AuthService { // Discord OAuth — exchange authorization code for JWT tokens rpc ExchangeDiscordCode(DiscordExchangeRequest) returns (AuthResponse); + // Steam OpenID 2.0 — generate redirect URL (state stored server-side) + rpc GetSteamAuthURL(GetSteamAuthURLRequest) returns (OAuthURLResponse); + + // Steam OpenID 2.0 — verify OpenID assertion and return JWT tokens + rpc ExchangeSteamLogin(SteamExchangeRequest) returns (AuthResponse); + + // VK OAuth — generate redirect URL (state stored server-side) + rpc GetVKOAuthURL(GetVKOAuthURLRequest) returns (OAuthURLResponse); + + // VK OAuth — exchange authorization code for JWT tokens + rpc ExchangeVKCode(VKExchangeRequest) returns (AuthResponse); + // Issue new token pair from a valid refresh token rpc RefreshToken(RefreshTokenRequest) returns (AuthResponse); @@ -63,6 +75,29 @@ message DiscordExchangeRequest { string redirect_uri = 3; } +// GetSteamAuthURLRequest — caller provides the redirect_uri for their service +message GetSteamAuthURLRequest { + string redirect_uri = 1; +} + +// SteamExchangeRequest — all OpenID 2.0 params received in the Steam callback +message SteamExchangeRequest { + string state = 1; + map openid_params = 2; +} + +// GetVKOAuthURLRequest — caller provides the redirect_uri for their service +message GetVKOAuthURLRequest { + string redirect_uri = 1; +} + +// VKExchangeRequest — exchange code received in VK callback +message VKExchangeRequest { + string code = 1; + string state = 2; + string redirect_uri = 3; +} + // AuthResponse is returned after successful authentication message AuthResponse { string access_token = 1; diff --git a/auth_grpc.pb.go b/auth_grpc.pb.go index 2f52806..b29d030 100644 --- a/auth_grpc.pb.go +++ b/auth_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.6.1 // - protoc v7.34.0 -// source: proto/l-ai-core-proto/auth.proto +// source: auth.proto package proto @@ -23,6 +23,10 @@ const ( AuthService_AuthWithTelegramToken_FullMethodName = "/auth.AuthService/AuthWithTelegramToken" AuthService_GetDiscordOAuthURL_FullMethodName = "/auth.AuthService/GetDiscordOAuthURL" AuthService_ExchangeDiscordCode_FullMethodName = "/auth.AuthService/ExchangeDiscordCode" + AuthService_GetSteamAuthURL_FullMethodName = "/auth.AuthService/GetSteamAuthURL" + AuthService_ExchangeSteamLogin_FullMethodName = "/auth.AuthService/ExchangeSteamLogin" + AuthService_GetVKOAuthURL_FullMethodName = "/auth.AuthService/GetVKOAuthURL" + AuthService_ExchangeVKCode_FullMethodName = "/auth.AuthService/ExchangeVKCode" AuthService_RefreshToken_FullMethodName = "/auth.AuthService/RefreshToken" AuthService_RevokeToken_FullMethodName = "/auth.AuthService/RevokeToken" AuthService_ValidateToken_FullMethodName = "/auth.AuthService/ValidateToken" @@ -43,6 +47,14 @@ type AuthServiceClient interface { GetDiscordOAuthURL(ctx context.Context, in *GetDiscordOAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error) // Discord OAuth — exchange authorization code for JWT tokens ExchangeDiscordCode(ctx context.Context, in *DiscordExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error) + // Steam OpenID 2.0 — generate redirect URL (state stored server-side) + GetSteamAuthURL(ctx context.Context, in *GetSteamAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error) + // Steam OpenID 2.0 — verify OpenID assertion and return JWT tokens + ExchangeSteamLogin(ctx context.Context, in *SteamExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error) + // VK OAuth — generate redirect URL (state stored server-side) + GetVKOAuthURL(ctx context.Context, in *GetVKOAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error) + // VK OAuth — exchange authorization code for JWT tokens + ExchangeVKCode(ctx context.Context, in *VKExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error) // Issue new token pair from a valid refresh token RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error) // Revoke a token (add to blacklist) @@ -99,6 +111,46 @@ func (c *authServiceClient) ExchangeDiscordCode(ctx context.Context, in *Discord return out, nil } +func (c *authServiceClient) GetSteamAuthURL(ctx context.Context, in *GetSteamAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OAuthURLResponse) + err := c.cc.Invoke(ctx, AuthService_GetSteamAuthURL_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) ExchangeSteamLogin(ctx context.Context, in *SteamExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AuthResponse) + err := c.cc.Invoke(ctx, AuthService_ExchangeSteamLogin_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetVKOAuthURL(ctx context.Context, in *GetVKOAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(OAuthURLResponse) + err := c.cc.Invoke(ctx, AuthService_GetVKOAuthURL_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) ExchangeVKCode(ctx context.Context, in *VKExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AuthResponse) + err := c.cc.Invoke(ctx, AuthService_ExchangeVKCode_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *authServiceClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AuthResponse) @@ -144,6 +196,14 @@ type AuthServiceServer interface { GetDiscordOAuthURL(context.Context, *GetDiscordOAuthURLRequest) (*OAuthURLResponse, error) // Discord OAuth — exchange authorization code for JWT tokens ExchangeDiscordCode(context.Context, *DiscordExchangeRequest) (*AuthResponse, error) + // Steam OpenID 2.0 — generate redirect URL (state stored server-side) + GetSteamAuthURL(context.Context, *GetSteamAuthURLRequest) (*OAuthURLResponse, error) + // Steam OpenID 2.0 — verify OpenID assertion and return JWT tokens + ExchangeSteamLogin(context.Context, *SteamExchangeRequest) (*AuthResponse, error) + // VK OAuth — generate redirect URL (state stored server-side) + GetVKOAuthURL(context.Context, *GetVKOAuthURLRequest) (*OAuthURLResponse, error) + // VK OAuth — exchange authorization code for JWT tokens + ExchangeVKCode(context.Context, *VKExchangeRequest) (*AuthResponse, error) // Issue new token pair from a valid refresh token RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error) // Revoke a token (add to blacklist) @@ -172,6 +232,18 @@ func (UnimplementedAuthServiceServer) GetDiscordOAuthURL(context.Context, *GetDi func (UnimplementedAuthServiceServer) ExchangeDiscordCode(context.Context, *DiscordExchangeRequest) (*AuthResponse, error) { return nil, status.Error(codes.Unimplemented, "method ExchangeDiscordCode not implemented") } +func (UnimplementedAuthServiceServer) GetSteamAuthURL(context.Context, *GetSteamAuthURLRequest) (*OAuthURLResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetSteamAuthURL not implemented") +} +func (UnimplementedAuthServiceServer) ExchangeSteamLogin(context.Context, *SteamExchangeRequest) (*AuthResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ExchangeSteamLogin not implemented") +} +func (UnimplementedAuthServiceServer) GetVKOAuthURL(context.Context, *GetVKOAuthURLRequest) (*OAuthURLResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetVKOAuthURL not implemented") +} +func (UnimplementedAuthServiceServer) ExchangeVKCode(context.Context, *VKExchangeRequest) (*AuthResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ExchangeVKCode not implemented") +} func (UnimplementedAuthServiceServer) RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error) { return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented") } @@ -274,6 +346,78 @@ func _AuthService_ExchangeDiscordCode_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _AuthService_GetSteamAuthURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSteamAuthURLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetSteamAuthURL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_GetSteamAuthURL_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetSteamAuthURL(ctx, req.(*GetSteamAuthURLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_ExchangeSteamLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SteamExchangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).ExchangeSteamLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_ExchangeSteamLogin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).ExchangeSteamLogin(ctx, req.(*SteamExchangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetVKOAuthURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVKOAuthURLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetVKOAuthURL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_GetVKOAuthURL_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetVKOAuthURL(ctx, req.(*GetVKOAuthURLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_ExchangeVKCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VKExchangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).ExchangeVKCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_ExchangeVKCode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).ExchangeVKCode(ctx, req.(*VKExchangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RefreshTokenRequest) if err := dec(in); err != nil { @@ -351,6 +495,22 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ExchangeDiscordCode", Handler: _AuthService_ExchangeDiscordCode_Handler, }, + { + MethodName: "GetSteamAuthURL", + Handler: _AuthService_GetSteamAuthURL_Handler, + }, + { + MethodName: "ExchangeSteamLogin", + Handler: _AuthService_ExchangeSteamLogin_Handler, + }, + { + MethodName: "GetVKOAuthURL", + Handler: _AuthService_GetVKOAuthURL_Handler, + }, + { + MethodName: "ExchangeVKCode", + Handler: _AuthService_ExchangeVKCode_Handler, + }, { MethodName: "RefreshToken", Handler: _AuthService_RefreshToken_Handler, @@ -365,5 +525,5 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/l-ai-core-proto/auth.proto", + Metadata: "auth.proto", }