diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-08-29 15:08:47 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-08-29 15:08:47 +0200 |
commit | 8e1595265925e0840d07e943b8c9ff1e906d4719 (patch) | |
tree | 644ad23420ca590c3b8980aab6cb8c5816e5052c /src/server/proto | |
parent | bffc7ece61abf9fdc8c5dd599a8d22a549dc6b00 (diff) |
Core/Auth: Refactor client auth key storage to support more future client variants and preserve more information about client version
Diffstat (limited to 'src/server/proto')
-rw-r--r-- | src/server/proto/RealmList/RealmList.pb.cc | 113 | ||||
-rw-r--r-- | src/server/proto/RealmList/RealmList.pb.h | 254 | ||||
-rw-r--r-- | src/server/proto/RealmList/RealmList.proto | 7 |
3 files changed, 373 insertions, 1 deletions
diff --git a/src/server/proto/RealmList/RealmList.pb.cc b/src/server/proto/RealmList/RealmList.pb.cc index 44c27eadcd8..41050ae0824 100644 --- a/src/server/proto/RealmList/RealmList.pb.cc +++ b/src/server/proto/RealmList/RealmList.pb.cc @@ -60,6 +60,9 @@ const ::google::protobuf::internal::GeneratedMessageReflection* const ::google::protobuf::Descriptor* RealmListServerIPAddresses_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* RealmListServerIPAddresses_reflection_ = NULL; +const ::google::protobuf::Descriptor* RealmJoinTicket_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + RealmJoinTicket_reflection_ = NULL; } // namespace @@ -296,6 +299,24 @@ void protobuf_AssignDesc_RealmList_2eproto() { ::google::protobuf::DescriptorPool::generated_pool(), ::google::protobuf::MessageFactory::generated_factory(), sizeof(RealmListServerIPAddresses)); + RealmJoinTicket_descriptor_ = file->message_type(13); + static const int RealmJoinTicket_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, gameaccount_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, platform_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, clientarch_), + }; + RealmJoinTicket_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RealmJoinTicket_descriptor_, + RealmJoinTicket::default_instance_, + RealmJoinTicket_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RealmJoinTicket, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RealmJoinTicket)); } namespace { @@ -334,6 +355,8 @@ void protobuf_RegisterTypes(const ::std::string&) { RealmIPAddressFamily_descriptor_, &RealmIPAddressFamily::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( RealmListServerIPAddresses_descriptor_, &RealmListServerIPAddresses::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RealmJoinTicket_descriptor_, &RealmJoinTicket::default_instance()); } } // namespace @@ -365,6 +388,8 @@ void protobuf_ShutdownFile_RealmList_2eproto() { delete RealmIPAddressFamily_reflection_; delete RealmListServerIPAddresses::default_instance_; delete RealmListServerIPAddresses_reflection_; + delete RealmJoinTicket::default_instance_; + delete RealmJoinTicket_reflection_; } void protobuf_AddDesc_RealmList_2eproto() { @@ -411,7 +436,9 @@ void protobuf_AddDesc_RealmList_2eproto() { "mily\030\001 \002(\r\022,\n\taddresses\030\002 \003(\0132\031.JSON.Rea" "lmList.IPAddress\"T\n\032RealmListServerIPAdd" "resses\0226\n\010families\030\001 \003(\0132$.JSON.RealmLis" - "t.RealmIPAddressFamilyB\002H\002", 1506); + "t.RealmIPAddressFamily\"Z\n\017RealmJoinTicke" + "t\022\023\n\013gameAccount\030\001 \002(\t\022\020\n\010platform\030\002 \002(\007" + "\022\014\n\004type\030\003 \002(\007\022\022\n\nclientArch\030\004 \002(\007B\002H\002", 1598); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "RealmList.proto", &protobuf_RegisterTypes); RealmListTicketIdentity::default_instance_ = new RealmListTicketIdentity(); @@ -427,6 +454,7 @@ void protobuf_AddDesc_RealmList_2eproto() { IPAddress::default_instance_ = new IPAddress(); RealmIPAddressFamily::default_instance_ = new RealmIPAddressFamily(); RealmListServerIPAddresses::default_instance_ = new RealmListServerIPAddresses(); + RealmJoinTicket::default_instance_ = new RealmJoinTicket(); RealmListTicketIdentity::default_instance_->InitAsDefaultInstance(); ClientVersion::default_instance_->InitAsDefaultInstance(); ClientInformation::default_instance_->InitAsDefaultInstance(); @@ -440,6 +468,7 @@ void protobuf_AddDesc_RealmList_2eproto() { IPAddress::default_instance_->InitAsDefaultInstance(); RealmIPAddressFamily::default_instance_->InitAsDefaultInstance(); RealmListServerIPAddresses::default_instance_->InitAsDefaultInstance(); + RealmJoinTicket::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_RealmList_2eproto); } @@ -1474,6 +1503,88 @@ void RealmListServerIPAddresses::Swap(RealmListServerIPAddresses* other) { return metadata; } +// =================================================================== + +#ifndef _MSC_VER +const int RealmJoinTicket::kGameAccountFieldNumber; +const int RealmJoinTicket::kPlatformFieldNumber; +const int RealmJoinTicket::kTypeFieldNumber; +const int RealmJoinTicket::kClientArchFieldNumber; +#endif // !_MSC_VER + +RealmJoinTicket::RealmJoinTicket() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:JSON.RealmList.RealmJoinTicket) +} + +void RealmJoinTicket::InitAsDefaultInstance() { +} + +RealmJoinTicket::RealmJoinTicket(const RealmJoinTicket& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:JSON.RealmList.RealmJoinTicket) +} + +void RealmJoinTicket::SharedCtor() { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + gameaccount_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + platform_ = 0u; + type_ = 0u; + clientarch_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +RealmJoinTicket::~RealmJoinTicket() { + // @@protoc_insertion_point(destructor:JSON.RealmList.RealmJoinTicket) + SharedDtor(); +} + +void RealmJoinTicket::SharedDtor() { + if (gameaccount_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete gameaccount_; + } + if (this != default_instance_) { + } +} + +void RealmJoinTicket::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* RealmJoinTicket::descriptor() { + protobuf_AssignDescriptorsOnce(); + return RealmJoinTicket_descriptor_; +} + +const RealmJoinTicket& RealmJoinTicket::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_RealmList_2eproto(); + return *default_instance_; +} + +RealmJoinTicket* RealmJoinTicket::default_instance_ = NULL; + +RealmJoinTicket* RealmJoinTicket::New() const { + return new RealmJoinTicket; +} + +void RealmJoinTicket::Swap(RealmJoinTicket* other) { + if (other != this) { + GetReflection()->Swap(this, other);} +} + +::google::protobuf::Metadata RealmJoinTicket::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RealmJoinTicket_descriptor_; + metadata.reflection = RealmJoinTicket_reflection_; + return metadata; +} + // @@protoc_insertion_point(namespace_scope) } // namespace RealmList diff --git a/src/server/proto/RealmList/RealmList.pb.h b/src/server/proto/RealmList/RealmList.pb.h index 56e61f22ae1..44cc4520d3b 100644 --- a/src/server/proto/RealmList/RealmList.pb.h +++ b/src/server/proto/RealmList/RealmList.pb.h @@ -48,6 +48,7 @@ class RealmListUpdates; class IPAddress; class RealmIPAddressFamily; class RealmListServerIPAddresses; +class RealmJoinTicket; // =================================================================== @@ -1277,6 +1278,107 @@ class TC_PROTO_API RealmListServerIPAddresses : public ::google::protobuf::Messa void InitAsDefaultInstance(); static RealmListServerIPAddresses* default_instance_; }; +// ------------------------------------------------------------------- + +class TC_PROTO_API RealmJoinTicket : public ::google::protobuf::Message { + public: + RealmJoinTicket(); + virtual ~RealmJoinTicket(); + + RealmJoinTicket(const RealmJoinTicket& from); + + inline RealmJoinTicket& operator=(const RealmJoinTicket& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RealmJoinTicket& default_instance(); + + void Swap(RealmJoinTicket* other); + + // implements Message ---------------------------------------------- + + RealmJoinTicket* New() const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string gameAccount = 1; + inline bool has_gameaccount() const; + inline void clear_gameaccount(); + static const int kGameAccountFieldNumber = 1; + inline const ::std::string& gameaccount() const; + inline void set_gameaccount(const ::std::string& value); + inline void set_gameaccount(const char* value); + inline void set_gameaccount(const char* value, size_t size); + inline ::std::string* mutable_gameaccount(); + inline ::std::string* release_gameaccount(); + inline void set_allocated_gameaccount(::std::string* gameaccount); + + // required fixed32 platform = 2; + inline bool has_platform() const; + inline void clear_platform(); + static const int kPlatformFieldNumber = 2; + inline ::google::protobuf::uint32 platform() const; + inline void set_platform(::google::protobuf::uint32 value); + + // required fixed32 type = 3; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 3; + inline ::google::protobuf::uint32 type() const; + inline void set_type(::google::protobuf::uint32 value); + + // required fixed32 clientArch = 4; + inline bool has_clientarch() const; + inline void clear_clientarch(); + static const int kClientArchFieldNumber = 4; + inline ::google::protobuf::uint32 clientarch() const; + inline void set_clientarch(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:JSON.RealmList.RealmJoinTicket) + private: + inline void set_has_gameaccount(); + inline void clear_has_gameaccount(); + inline void set_has_platform(); + inline void clear_has_platform(); + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_clientarch(); + inline void clear_has_clientarch(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* gameaccount_; + ::google::protobuf::uint32 platform_; + ::google::protobuf::uint32 type_; + ::google::protobuf::uint32 clientarch_; + friend void TC_PROTO_API protobuf_AddDesc_RealmList_2eproto(); + friend void protobuf_AssignDesc_RealmList_2eproto(); + friend void protobuf_ShutdownFile_RealmList_2eproto(); + + void InitAsDefaultInstance(); + static RealmJoinTicket* default_instance_; +}; // =================================================================== // =================================================================== @@ -2817,6 +2919,158 @@ RealmListServerIPAddresses::mutable_families() { return &families_; } +// ------------------------------------------------------------------- + +// RealmJoinTicket + +// required string gameAccount = 1; +inline bool RealmJoinTicket::has_gameaccount() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void RealmJoinTicket::set_has_gameaccount() { + _has_bits_[0] |= 0x00000001u; +} +inline void RealmJoinTicket::clear_has_gameaccount() { + _has_bits_[0] &= ~0x00000001u; +} +inline void RealmJoinTicket::clear_gameaccount() { + if (gameaccount_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + gameaccount_->clear(); + } + clear_has_gameaccount(); +} +inline const ::std::string& RealmJoinTicket::gameaccount() const { + // @@protoc_insertion_point(field_get:JSON.RealmList.RealmJoinTicket.gameAccount) + return *gameaccount_; +} +inline void RealmJoinTicket::set_gameaccount(const ::std::string& value) { + set_has_gameaccount(); + if (gameaccount_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + gameaccount_ = new ::std::string; + } + gameaccount_->assign(value); + // @@protoc_insertion_point(field_set:JSON.RealmList.RealmJoinTicket.gameAccount) +} +inline void RealmJoinTicket::set_gameaccount(const char* value) { + set_has_gameaccount(); + if (gameaccount_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + gameaccount_ = new ::std::string; + } + gameaccount_->assign(value); + // @@protoc_insertion_point(field_set_char:JSON.RealmList.RealmJoinTicket.gameAccount) +} +inline void RealmJoinTicket::set_gameaccount(const char* value, size_t size) { + set_has_gameaccount(); + if (gameaccount_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + gameaccount_ = new ::std::string; + } + gameaccount_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:JSON.RealmList.RealmJoinTicket.gameAccount) +} +inline ::std::string* RealmJoinTicket::mutable_gameaccount() { + set_has_gameaccount(); + if (gameaccount_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + gameaccount_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:JSON.RealmList.RealmJoinTicket.gameAccount) + return gameaccount_; +} +inline ::std::string* RealmJoinTicket::release_gameaccount() { + clear_has_gameaccount(); + if (gameaccount_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = gameaccount_; + gameaccount_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void RealmJoinTicket::set_allocated_gameaccount(::std::string* gameaccount) { + if (gameaccount_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete gameaccount_; + } + if (gameaccount) { + set_has_gameaccount(); + gameaccount_ = gameaccount; + } else { + clear_has_gameaccount(); + gameaccount_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:JSON.RealmList.RealmJoinTicket.gameAccount) +} + +// required fixed32 platform = 2; +inline bool RealmJoinTicket::has_platform() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void RealmJoinTicket::set_has_platform() { + _has_bits_[0] |= 0x00000002u; +} +inline void RealmJoinTicket::clear_has_platform() { + _has_bits_[0] &= ~0x00000002u; +} +inline void RealmJoinTicket::clear_platform() { + platform_ = 0u; + clear_has_platform(); +} +inline ::google::protobuf::uint32 RealmJoinTicket::platform() const { + // @@protoc_insertion_point(field_get:JSON.RealmList.RealmJoinTicket.platform) + return platform_; +} +inline void RealmJoinTicket::set_platform(::google::protobuf::uint32 value) { + set_has_platform(); + platform_ = value; + // @@protoc_insertion_point(field_set:JSON.RealmList.RealmJoinTicket.platform) +} + +// required fixed32 type = 3; +inline bool RealmJoinTicket::has_type() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void RealmJoinTicket::set_has_type() { + _has_bits_[0] |= 0x00000004u; +} +inline void RealmJoinTicket::clear_has_type() { + _has_bits_[0] &= ~0x00000004u; +} +inline void RealmJoinTicket::clear_type() { + type_ = 0u; + clear_has_type(); +} +inline ::google::protobuf::uint32 RealmJoinTicket::type() const { + // @@protoc_insertion_point(field_get:JSON.RealmList.RealmJoinTicket.type) + return type_; +} +inline void RealmJoinTicket::set_type(::google::protobuf::uint32 value) { + set_has_type(); + type_ = value; + // @@protoc_insertion_point(field_set:JSON.RealmList.RealmJoinTicket.type) +} + +// required fixed32 clientArch = 4; +inline bool RealmJoinTicket::has_clientarch() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void RealmJoinTicket::set_has_clientarch() { + _has_bits_[0] |= 0x00000008u; +} +inline void RealmJoinTicket::clear_has_clientarch() { + _has_bits_[0] &= ~0x00000008u; +} +inline void RealmJoinTicket::clear_clientarch() { + clientarch_ = 0u; + clear_has_clientarch(); +} +inline ::google::protobuf::uint32 RealmJoinTicket::clientarch() const { + // @@protoc_insertion_point(field_get:JSON.RealmList.RealmJoinTicket.clientArch) + return clientarch_; +} +inline void RealmJoinTicket::set_clientarch(::google::protobuf::uint32 value) { + set_has_clientarch(); + clientarch_ = value; + // @@protoc_insertion_point(field_set:JSON.RealmList.RealmJoinTicket.clientArch) +} + // @@protoc_insertion_point(namespace_scope) } // namespace RealmList diff --git a/src/server/proto/RealmList/RealmList.proto b/src/server/proto/RealmList/RealmList.proto index aa184d46f8c..7fca92b8413 100644 --- a/src/server/proto/RealmList/RealmList.proto +++ b/src/server/proto/RealmList/RealmList.proto @@ -87,3 +87,10 @@ message RealmIPAddressFamily { message RealmListServerIPAddresses { repeated RealmIPAddressFamily families = 1; } + +message RealmJoinTicket { + required string gameAccount = 1; + required fixed32 platform = 2; + required fixed32 type = 3; + required fixed32 clientArch = 4; +} |