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 <noreply@anthropic.com>
This commit is contained in:
parent
33e75e5cb9
commit
7d3c064ed8
405
auth.pb.go
405
auth.pb.go
@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.11
|
// protoc-gen-go v1.36.11
|
||||||
// protoc v7.34.0
|
// protoc v7.34.0
|
||||||
// source: proto/l-ai-core-proto/auth.proto
|
// source: auth.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ type TelegramTokenRequest struct {
|
|||||||
|
|
||||||
func (x *TelegramTokenRequest) Reset() {
|
func (x *TelegramTokenRequest) Reset() {
|
||||||
*x = TelegramTokenRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ func (x *TelegramTokenRequest) String() string {
|
|||||||
func (*TelegramTokenRequest) ProtoMessage() {}
|
func (*TelegramTokenRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TelegramTokenRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -56,7 +56,7 @@ func (x *TelegramTokenRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TelegramTokenRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TelegramTokenRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*TelegramTokenRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *TelegramTokenRequest) GetIdToken() string {
|
||||||
@ -82,7 +82,7 @@ type TelegramAuthRequest struct {
|
|||||||
|
|
||||||
func (x *TelegramAuthRequest) Reset() {
|
func (x *TelegramAuthRequest) Reset() {
|
||||||
*x = TelegramAuthRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ func (x *TelegramAuthRequest) String() string {
|
|||||||
func (*TelegramAuthRequest) ProtoMessage() {}
|
func (*TelegramAuthRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TelegramAuthRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -107,7 +107,7 @@ func (x *TelegramAuthRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TelegramAuthRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TelegramAuthRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*TelegramAuthRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *TelegramAuthRequest) GetId() int64 {
|
||||||
@ -169,7 +169,7 @@ type GetDiscordOAuthURLRequest struct {
|
|||||||
|
|
||||||
func (x *GetDiscordOAuthURLRequest) Reset() {
|
func (x *GetDiscordOAuthURLRequest) Reset() {
|
||||||
*x = GetDiscordOAuthURLRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ func (x *GetDiscordOAuthURLRequest) String() string {
|
|||||||
func (*GetDiscordOAuthURLRequest) ProtoMessage() {}
|
func (*GetDiscordOAuthURLRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GetDiscordOAuthURLRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -194,7 +194,7 @@ func (x *GetDiscordOAuthURLRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GetDiscordOAuthURLRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GetDiscordOAuthURLRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*GetDiscordOAuthURLRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *GetDiscordOAuthURLRequest) GetRedirectUri() string {
|
||||||
@ -215,7 +215,7 @@ type OAuthURLResponse struct {
|
|||||||
|
|
||||||
func (x *OAuthURLResponse) Reset() {
|
func (x *OAuthURLResponse) Reset() {
|
||||||
*x = OAuthURLResponse{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -227,7 +227,7 @@ func (x *OAuthURLResponse) String() string {
|
|||||||
func (*OAuthURLResponse) ProtoMessage() {}
|
func (*OAuthURLResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *OAuthURLResponse) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -240,7 +240,7 @@ func (x *OAuthURLResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use OAuthURLResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use OAuthURLResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*OAuthURLResponse) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *OAuthURLResponse) GetUrl() string {
|
||||||
@ -269,7 +269,7 @@ type DiscordExchangeRequest struct {
|
|||||||
|
|
||||||
func (x *DiscordExchangeRequest) Reset() {
|
func (x *DiscordExchangeRequest) Reset() {
|
||||||
*x = DiscordExchangeRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ func (x *DiscordExchangeRequest) String() string {
|
|||||||
func (*DiscordExchangeRequest) ProtoMessage() {}
|
func (*DiscordExchangeRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DiscordExchangeRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -294,7 +294,7 @@ func (x *DiscordExchangeRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DiscordExchangeRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DiscordExchangeRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*DiscordExchangeRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *DiscordExchangeRequest) GetCode() string {
|
||||||
@ -318,6 +318,210 @@ func (x *DiscordExchangeRequest) GetRedirectUri() string {
|
|||||||
return ""
|
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
|
// AuthResponse is returned after successful authentication
|
||||||
type AuthResponse struct {
|
type AuthResponse struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
@ -332,7 +536,7 @@ type AuthResponse struct {
|
|||||||
|
|
||||||
func (x *AuthResponse) Reset() {
|
func (x *AuthResponse) Reset() {
|
||||||
*x = AuthResponse{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -344,7 +548,7 @@ func (x *AuthResponse) String() string {
|
|||||||
func (*AuthResponse) ProtoMessage() {}
|
func (*AuthResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *AuthResponse) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -357,7 +561,7 @@ func (x *AuthResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*AuthResponse) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *AuthResponse) GetAccessToken() string {
|
||||||
@ -404,7 +608,7 @@ type RefreshTokenRequest struct {
|
|||||||
|
|
||||||
func (x *RefreshTokenRequest) Reset() {
|
func (x *RefreshTokenRequest) Reset() {
|
||||||
*x = RefreshTokenRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -416,7 +620,7 @@ func (x *RefreshTokenRequest) String() string {
|
|||||||
func (*RefreshTokenRequest) ProtoMessage() {}
|
func (*RefreshTokenRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -429,7 +633,7 @@ func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RefreshTokenRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*RefreshTokenRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *RefreshTokenRequest) GetRefreshToken() string {
|
||||||
@ -448,7 +652,7 @@ type RevokeTokenRequest struct {
|
|||||||
|
|
||||||
func (x *RevokeTokenRequest) Reset() {
|
func (x *RevokeTokenRequest) Reset() {
|
||||||
*x = RevokeTokenRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -460,7 +664,7 @@ func (x *RevokeTokenRequest) String() string {
|
|||||||
func (*RevokeTokenRequest) ProtoMessage() {}
|
func (*RevokeTokenRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -473,7 +677,7 @@ func (x *RevokeTokenRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RevokeTokenRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RevokeTokenRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*RevokeTokenRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *RevokeTokenRequest) GetToken() string {
|
||||||
@ -492,7 +696,7 @@ type RevokeTokenResponse struct {
|
|||||||
|
|
||||||
func (x *RevokeTokenResponse) Reset() {
|
func (x *RevokeTokenResponse) Reset() {
|
||||||
*x = RevokeTokenResponse{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -504,7 +708,7 @@ func (x *RevokeTokenResponse) String() string {
|
|||||||
func (*RevokeTokenResponse) ProtoMessage() {}
|
func (*RevokeTokenResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -517,7 +721,7 @@ func (x *RevokeTokenResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RevokeTokenResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RevokeTokenResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*RevokeTokenResponse) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *RevokeTokenResponse) GetSuccess() bool {
|
||||||
@ -536,7 +740,7 @@ type ValidateTokenRequest struct {
|
|||||||
|
|
||||||
func (x *ValidateTokenRequest) Reset() {
|
func (x *ValidateTokenRequest) Reset() {
|
||||||
*x = ValidateTokenRequest{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -548,7 +752,7 @@ func (x *ValidateTokenRequest) String() string {
|
|||||||
func (*ValidateTokenRequest) ProtoMessage() {}
|
func (*ValidateTokenRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -561,7 +765,7 @@ func (x *ValidateTokenRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ValidateTokenRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*ValidateTokenRequest) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *ValidateTokenRequest) GetToken() string {
|
||||||
@ -583,7 +787,7 @@ type ValidateTokenResponse struct {
|
|||||||
|
|
||||||
func (x *ValidateTokenResponse) Reset() {
|
func (x *ValidateTokenResponse) Reset() {
|
||||||
*x = ValidateTokenResponse{}
|
*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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -595,7 +799,7 @@ func (x *ValidateTokenResponse) String() string {
|
|||||||
func (*ValidateTokenResponse) ProtoMessage() {}
|
func (*ValidateTokenResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ValidateTokenResponse) ProtoReflect() protoreflect.Message {
|
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 {
|
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 {
|
||||||
@ -608,7 +812,7 @@ func (x *ValidateTokenResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ValidateTokenResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ValidateTokenResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*ValidateTokenResponse) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *ValidateTokenResponse) GetValid() bool {
|
||||||
@ -639,11 +843,12 @@ func (x *ValidateTokenResponse) GetLinkedPlatforms() []string {
|
|||||||
return nil
|
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" +
|
"\n" +
|
||||||
" proto/l-ai-core-proto/auth.proto\x12\x04auth\"1\n" +
|
"\n" +
|
||||||
|
"auth.proto\x12\x04auth\"1\n" +
|
||||||
"\x14TelegramTokenRequest\x12\x19\n" +
|
"\x14TelegramTokenRequest\x12\x19\n" +
|
||||||
"\bid_token\x18\x01 \x01(\tR\aidToken\"\xcb\x01\n" +
|
"\bid_token\x18\x01 \x01(\tR\aidToken\"\xcb\x01\n" +
|
||||||
"\x13TelegramAuthRequest\x12\x0e\n" +
|
"\x13TelegramAuthRequest\x12\x0e\n" +
|
||||||
@ -663,6 +868,20 @@ const file_proto_l_ai_core_proto_auth_proto_rawDesc = "" +
|
|||||||
"\x16DiscordExchangeRequest\x12\x12\n" +
|
"\x16DiscordExchangeRequest\x12\x12\n" +
|
||||||
"\x04code\x18\x01 \x01(\tR\x04code\x12\x14\n" +
|
"\x04code\x18\x01 \x01(\tR\x04code\x12\x14\n" +
|
||||||
"\x05state\x18\x02 \x01(\tR\x05state\x12!\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" +
|
"\fredirect_uri\x18\x03 \x01(\tR\vredirectUri\"\xbe\x01\n" +
|
||||||
"\fAuthResponse\x12!\n" +
|
"\fAuthResponse\x12!\n" +
|
||||||
"\faccess_token\x18\x01 \x01(\tR\vaccessToken\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" +
|
"\x05valid\x18\x01 \x01(\bR\x05valid\x12$\n" +
|
||||||
"\x0eglobal_user_id\x18\x02 \x01(\x03R\fglobalUserId\x12!\n" +
|
"\x0eglobal_user_id\x18\x02 \x01(\x03R\fglobalUserId\x12!\n" +
|
||||||
"\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\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" +
|
"\vAuthService\x12A\n" +
|
||||||
"\x10AuthWithTelegram\x12\x19.auth.TelegramAuthRequest\x1a\x12.auth.AuthResponse\x12G\n" +
|
"\x10AuthWithTelegram\x12\x19.auth.TelegramAuthRequest\x1a\x12.auth.AuthResponse\x12G\n" +
|
||||||
"\x15AuthWithTelegramToken\x12\x1a.auth.TelegramTokenRequest\x1a\x12.auth.AuthResponse\x12M\n" +
|
"\x15AuthWithTelegramToken\x12\x1a.auth.TelegramTokenRequest\x1a\x12.auth.AuthResponse\x12M\n" +
|
||||||
"\x12GetDiscordOAuthURL\x12\x1f.auth.GetDiscordOAuthURLRequest\x1a\x16.auth.OAuthURLResponse\x12G\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" +
|
"\fRefreshToken\x12\x19.auth.RefreshTokenRequest\x1a\x12.auth.AuthResponse\x12B\n" +
|
||||||
"\vRevokeToken\x12\x18.auth.RevokeTokenRequest\x1a\x19.auth.RevokeTokenResponse\x12H\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"
|
"\rValidateToken\x12\x1a.auth.ValidateTokenRequest\x1a\x1b.auth.ValidateTokenResponseB(Z&ai_service/proto/l-ai-core-proto;protob\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_proto_l_ai_core_proto_auth_proto_rawDescOnce sync.Once
|
file_auth_proto_rawDescOnce sync.Once
|
||||||
file_proto_l_ai_core_proto_auth_proto_rawDescData []byte
|
file_auth_proto_rawDescData []byte
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_proto_l_ai_core_proto_auth_proto_rawDescGZIP() []byte {
|
func file_auth_proto_rawDescGZIP() []byte {
|
||||||
file_proto_l_ai_core_proto_auth_proto_rawDescOnce.Do(func() {
|
file_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)))
|
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_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||||
var file_proto_l_ai_core_proto_auth_proto_goTypes = []any{
|
var file_auth_proto_goTypes = []any{
|
||||||
(*TelegramTokenRequest)(nil), // 0: auth.TelegramTokenRequest
|
(*TelegramTokenRequest)(nil), // 0: auth.TelegramTokenRequest
|
||||||
(*TelegramAuthRequest)(nil), // 1: auth.TelegramAuthRequest
|
(*TelegramAuthRequest)(nil), // 1: auth.TelegramAuthRequest
|
||||||
(*GetDiscordOAuthURLRequest)(nil), // 2: auth.GetDiscordOAuthURLRequest
|
(*GetDiscordOAuthURLRequest)(nil), // 2: auth.GetDiscordOAuthURLRequest
|
||||||
(*OAuthURLResponse)(nil), // 3: auth.OAuthURLResponse
|
(*OAuthURLResponse)(nil), // 3: auth.OAuthURLResponse
|
||||||
(*DiscordExchangeRequest)(nil), // 4: auth.DiscordExchangeRequest
|
(*DiscordExchangeRequest)(nil), // 4: auth.DiscordExchangeRequest
|
||||||
(*AuthResponse)(nil), // 5: auth.AuthResponse
|
(*GetSteamAuthURLRequest)(nil), // 5: auth.GetSteamAuthURLRequest
|
||||||
(*RefreshTokenRequest)(nil), // 6: auth.RefreshTokenRequest
|
(*SteamExchangeRequest)(nil), // 6: auth.SteamExchangeRequest
|
||||||
(*RevokeTokenRequest)(nil), // 7: auth.RevokeTokenRequest
|
(*GetVKOAuthURLRequest)(nil), // 7: auth.GetVKOAuthURLRequest
|
||||||
(*RevokeTokenResponse)(nil), // 8: auth.RevokeTokenResponse
|
(*VKExchangeRequest)(nil), // 8: auth.VKExchangeRequest
|
||||||
(*ValidateTokenRequest)(nil), // 9: auth.ValidateTokenRequest
|
(*AuthResponse)(nil), // 9: auth.AuthResponse
|
||||||
(*ValidateTokenResponse)(nil), // 10: auth.ValidateTokenResponse
|
(*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{
|
var file_auth_proto_depIdxs = []int32{
|
||||||
1, // 0: auth.AuthService.AuthWithTelegram:input_type -> auth.TelegramAuthRequest
|
15, // 0: auth.SteamExchangeRequest.openid_params:type_name -> auth.SteamExchangeRequest.OpenidParamsEntry
|
||||||
0, // 1: auth.AuthService.AuthWithTelegramToken:input_type -> auth.TelegramTokenRequest
|
1, // 1: auth.AuthService.AuthWithTelegram:input_type -> auth.TelegramAuthRequest
|
||||||
2, // 2: auth.AuthService.GetDiscordOAuthURL:input_type -> auth.GetDiscordOAuthURLRequest
|
0, // 2: auth.AuthService.AuthWithTelegramToken:input_type -> auth.TelegramTokenRequest
|
||||||
4, // 3: auth.AuthService.ExchangeDiscordCode:input_type -> auth.DiscordExchangeRequest
|
2, // 3: auth.AuthService.GetDiscordOAuthURL:input_type -> auth.GetDiscordOAuthURLRequest
|
||||||
6, // 4: auth.AuthService.RefreshToken:input_type -> auth.RefreshTokenRequest
|
4, // 4: auth.AuthService.ExchangeDiscordCode:input_type -> auth.DiscordExchangeRequest
|
||||||
7, // 5: auth.AuthService.RevokeToken:input_type -> auth.RevokeTokenRequest
|
5, // 5: auth.AuthService.GetSteamAuthURL:input_type -> auth.GetSteamAuthURLRequest
|
||||||
9, // 6: auth.AuthService.ValidateToken:input_type -> auth.ValidateTokenRequest
|
6, // 6: auth.AuthService.ExchangeSteamLogin:input_type -> auth.SteamExchangeRequest
|
||||||
5, // 7: auth.AuthService.AuthWithTelegram:output_type -> auth.AuthResponse
|
7, // 7: auth.AuthService.GetVKOAuthURL:input_type -> auth.GetVKOAuthURLRequest
|
||||||
5, // 8: auth.AuthService.AuthWithTelegramToken:output_type -> auth.AuthResponse
|
8, // 8: auth.AuthService.ExchangeVKCode:input_type -> auth.VKExchangeRequest
|
||||||
3, // 9: auth.AuthService.GetDiscordOAuthURL:output_type -> auth.OAuthURLResponse
|
10, // 9: auth.AuthService.RefreshToken:input_type -> auth.RefreshTokenRequest
|
||||||
5, // 10: auth.AuthService.ExchangeDiscordCode:output_type -> auth.AuthResponse
|
11, // 10: auth.AuthService.RevokeToken:input_type -> auth.RevokeTokenRequest
|
||||||
5, // 11: auth.AuthService.RefreshToken:output_type -> auth.AuthResponse
|
13, // 11: auth.AuthService.ValidateToken:input_type -> auth.ValidateTokenRequest
|
||||||
8, // 12: auth.AuthService.RevokeToken:output_type -> auth.RevokeTokenResponse
|
9, // 12: auth.AuthService.AuthWithTelegram:output_type -> auth.AuthResponse
|
||||||
10, // 13: auth.AuthService.ValidateToken:output_type -> auth.ValidateTokenResponse
|
9, // 13: auth.AuthService.AuthWithTelegramToken:output_type -> auth.AuthResponse
|
||||||
7, // [7:14] is the sub-list for method output_type
|
3, // 14: auth.AuthService.GetDiscordOAuthURL:output_type -> auth.OAuthURLResponse
|
||||||
0, // [0:7] is the sub-list for method input_type
|
9, // 15: auth.AuthService.ExchangeDiscordCode:output_type -> auth.AuthResponse
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
3, // 16: auth.AuthService.GetSteamAuthURL:output_type -> auth.OAuthURLResponse
|
||||||
0, // [0:0] is the sub-list for extension extendee
|
9, // 17: auth.AuthService.ExchangeSteamLogin:output_type -> auth.AuthResponse
|
||||||
0, // [0:0] is the sub-list for field type_name
|
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 init() { file_auth_proto_init() }
|
||||||
func file_proto_l_ai_core_proto_auth_proto_init() {
|
func file_auth_proto_init() {
|
||||||
if File_proto_l_ai_core_proto_auth_proto != nil {
|
if File_auth_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
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_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,
|
NumEnums: 0,
|
||||||
NumMessages: 11,
|
NumMessages: 16,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_proto_l_ai_core_proto_auth_proto_goTypes,
|
GoTypes: file_auth_proto_goTypes,
|
||||||
DependencyIndexes: file_proto_l_ai_core_proto_auth_proto_depIdxs,
|
DependencyIndexes: file_auth_proto_depIdxs,
|
||||||
MessageInfos: file_proto_l_ai_core_proto_auth_proto_msgTypes,
|
MessageInfos: file_auth_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_proto_l_ai_core_proto_auth_proto = out.File
|
File_auth_proto = out.File
|
||||||
file_proto_l_ai_core_proto_auth_proto_goTypes = nil
|
file_auth_proto_goTypes = nil
|
||||||
file_proto_l_ai_core_proto_auth_proto_depIdxs = nil
|
file_auth_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|||||||
35
auth.proto
35
auth.proto
@ -19,6 +19,18 @@ service AuthService {
|
|||||||
// Discord OAuth — exchange authorization code for JWT tokens
|
// Discord OAuth — exchange authorization code for JWT tokens
|
||||||
rpc ExchangeDiscordCode(DiscordExchangeRequest) returns (AuthResponse);
|
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
|
// Issue new token pair from a valid refresh token
|
||||||
rpc RefreshToken(RefreshTokenRequest) returns (AuthResponse);
|
rpc RefreshToken(RefreshTokenRequest) returns (AuthResponse);
|
||||||
|
|
||||||
@ -63,6 +75,29 @@ message DiscordExchangeRequest {
|
|||||||
string redirect_uri = 3;
|
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<string, string> 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
|
// AuthResponse is returned after successful authentication
|
||||||
message AuthResponse {
|
message AuthResponse {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
|
|||||||
164
auth_grpc.pb.go
164
auth_grpc.pb.go
@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.6.1
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
// - protoc v7.34.0
|
// - protoc v7.34.0
|
||||||
// source: proto/l-ai-core-proto/auth.proto
|
// source: auth.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
|
|
||||||
@ -23,6 +23,10 @@ const (
|
|||||||
AuthService_AuthWithTelegramToken_FullMethodName = "/auth.AuthService/AuthWithTelegramToken"
|
AuthService_AuthWithTelegramToken_FullMethodName = "/auth.AuthService/AuthWithTelegramToken"
|
||||||
AuthService_GetDiscordOAuthURL_FullMethodName = "/auth.AuthService/GetDiscordOAuthURL"
|
AuthService_GetDiscordOAuthURL_FullMethodName = "/auth.AuthService/GetDiscordOAuthURL"
|
||||||
AuthService_ExchangeDiscordCode_FullMethodName = "/auth.AuthService/ExchangeDiscordCode"
|
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_RefreshToken_FullMethodName = "/auth.AuthService/RefreshToken"
|
||||||
AuthService_RevokeToken_FullMethodName = "/auth.AuthService/RevokeToken"
|
AuthService_RevokeToken_FullMethodName = "/auth.AuthService/RevokeToken"
|
||||||
AuthService_ValidateToken_FullMethodName = "/auth.AuthService/ValidateToken"
|
AuthService_ValidateToken_FullMethodName = "/auth.AuthService/ValidateToken"
|
||||||
@ -43,6 +47,14 @@ type AuthServiceClient interface {
|
|||||||
GetDiscordOAuthURL(ctx context.Context, in *GetDiscordOAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error)
|
GetDiscordOAuthURL(ctx context.Context, in *GetDiscordOAuthURLRequest, opts ...grpc.CallOption) (*OAuthURLResponse, error)
|
||||||
// Discord OAuth — exchange authorization code for JWT tokens
|
// Discord OAuth — exchange authorization code for JWT tokens
|
||||||
ExchangeDiscordCode(ctx context.Context, in *DiscordExchangeRequest, opts ...grpc.CallOption) (*AuthResponse, error)
|
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
|
// Issue new token pair from a valid refresh token
|
||||||
RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error)
|
RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error)
|
||||||
// Revoke a token (add to blacklist)
|
// Revoke a token (add to blacklist)
|
||||||
@ -99,6 +111,46 @@ func (c *authServiceClient) ExchangeDiscordCode(ctx context.Context, in *Discord
|
|||||||
return out, nil
|
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) {
|
func (c *authServiceClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*AuthResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(AuthResponse)
|
out := new(AuthResponse)
|
||||||
@ -144,6 +196,14 @@ type AuthServiceServer interface {
|
|||||||
GetDiscordOAuthURL(context.Context, *GetDiscordOAuthURLRequest) (*OAuthURLResponse, error)
|
GetDiscordOAuthURL(context.Context, *GetDiscordOAuthURLRequest) (*OAuthURLResponse, error)
|
||||||
// Discord OAuth — exchange authorization code for JWT tokens
|
// Discord OAuth — exchange authorization code for JWT tokens
|
||||||
ExchangeDiscordCode(context.Context, *DiscordExchangeRequest) (*AuthResponse, error)
|
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
|
// Issue new token pair from a valid refresh token
|
||||||
RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error)
|
RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error)
|
||||||
// Revoke a token (add to blacklist)
|
// Revoke a token (add to blacklist)
|
||||||
@ -172,6 +232,18 @@ func (UnimplementedAuthServiceServer) GetDiscordOAuthURL(context.Context, *GetDi
|
|||||||
func (UnimplementedAuthServiceServer) ExchangeDiscordCode(context.Context, *DiscordExchangeRequest) (*AuthResponse, error) {
|
func (UnimplementedAuthServiceServer) ExchangeDiscordCode(context.Context, *DiscordExchangeRequest) (*AuthResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method ExchangeDiscordCode not implemented")
|
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) {
|
func (UnimplementedAuthServiceServer) RefreshToken(context.Context, *RefreshTokenRequest) (*AuthResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method RefreshToken not implemented")
|
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)
|
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) {
|
func _AuthService_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(RefreshTokenRequest)
|
in := new(RefreshTokenRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -351,6 +495,22 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "ExchangeDiscordCode",
|
MethodName: "ExchangeDiscordCode",
|
||||||
Handler: _AuthService_ExchangeDiscordCode_Handler,
|
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",
|
MethodName: "RefreshToken",
|
||||||
Handler: _AuthService_RefreshToken_Handler,
|
Handler: _AuthService_RefreshToken_Handler,
|
||||||
@ -365,5 +525,5 @@ var AuthService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "proto/l-ai-core-proto/auth.proto",
|
Metadata: "auth.proto",
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user