diff --git a/strafesnet/auth_pb2.py b/strafesnet/auth_pb2.py index aefd5d7..861589a 100644 --- a/strafesnet/auth_pb2.py +++ b/strafesnet/auth_pb2.py @@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder _sym_db = _symbol_database.Default() +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nauth.proto\x12\x04\x61uth\"\x1e\n\tIdMessage\x12\x11\n\tSessionID\x18\x01 \x01(\t\"J\n\x13SessionUserResponse\x12\x0e\n\x06UserID\x18\x01 \x01(\x04\x12\x10\n\x08Username\x18\x02 \x01(\t\x12\x11\n\tAvatarURL\x18\x03 \x01(\t\",\n\x0bRoleReponse\x12\x1d\n\x05Roles\x18\x01 \x03(\x0b\x32\x0e.auth.RoleItem\"9\n\x08RoleItem\x12\n\n\x02ID\x18\x01 \x01(\t\x12\x13\n\x0b\x44isplayName\x18\x02 \x01(\t\x12\x0c\n\x04Rank\x18\x03 \x01(\x05\"!\n\x10ValidateResponse\x12\r\n\x05Valid\x18\x01 \x01(\x08\x32\xbb\x01\n\x0b\x41uthService\x12<\n\x0eGetSessionUser\x12\x0f.auth.IdMessage\x1a\x19.auth.SessionUserResponse\x12\x32\n\x0cGetGroupRole\x12\x0f.auth.IdMessage\x1a\x11.auth.RoleReponse\x12:\n\x0fValidateSession\x12\x0f.auth.IdMessage\x1a\x16.auth.ValidateResponseB\'Z%git.itzana.me/strafesnet/go-grpc/authb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nauth.proto\x12\x04\x61uth\x1a\x1bgoogle/protobuf/empty.proto\"\x1e\n\tIdMessage\x12\x11\n\tSessionID\x18\x01 \x01(\t\"J\n\x13SessionUserResponse\x12\x0e\n\x06UserID\x18\x01 \x01(\x04\x12\x10\n\x08Username\x18\x02 \x01(\t\x12\x11\n\tAvatarURL\x18\x03 \x01(\t\",\n\x0bRoleReponse\x12\x1d\n\x05Roles\x18\x01 \x03(\x0b\x32\x0e.auth.RoleItem\"9\n\x08RoleItem\x12\n\n\x02ID\x18\x01 \x01(\t\x12\x13\n\x0b\x44isplayName\x18\x02 \x01(\t\x12\x0c\n\x04Rank\x18\x03 \x01(\x05\"!\n\x10ValidateResponse\x12\r\n\x05Valid\x18\x01 \x01(\x08\"O\n\x14\x41uthMetadataResponse\x12\x10\n\x08LoginURL\x18\x01 \x01(\t\x12\x11\n\tLogoutURL\x18\x02 \x01(\t\x12\x12\n\nAccountURL\x18\x03 \x01(\t2\x82\x02\n\x0b\x41uthService\x12<\n\x0eGetSessionUser\x12\x0f.auth.IdMessage\x1a\x19.auth.SessionUserResponse\x12\x32\n\x0cGetGroupRole\x12\x0f.auth.IdMessage\x1a\x11.auth.RoleReponse\x12:\n\x0fValidateSession\x12\x0f.auth.IdMessage\x1a\x16.auth.ValidateResponse\x12\x45\n\x0fGetAuthMetadata\x12\x16.google.protobuf.Empty\x1a\x1a.auth.AuthMetadataResponseB\'Z%git.itzana.me/strafesnet/go-grpc/authb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,16 +23,18 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'auth_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z%git.itzana.me/strafesnet/go-grpc/auth' - _globals['_IDMESSAGE']._serialized_start=20 - _globals['_IDMESSAGE']._serialized_end=50 - _globals['_SESSIONUSERRESPONSE']._serialized_start=52 - _globals['_SESSIONUSERRESPONSE']._serialized_end=126 - _globals['_ROLEREPONSE']._serialized_start=128 - _globals['_ROLEREPONSE']._serialized_end=172 - _globals['_ROLEITEM']._serialized_start=174 - _globals['_ROLEITEM']._serialized_end=231 - _globals['_VALIDATERESPONSE']._serialized_start=233 - _globals['_VALIDATERESPONSE']._serialized_end=266 - _globals['_AUTHSERVICE']._serialized_start=269 - _globals['_AUTHSERVICE']._serialized_end=456 + _globals['_IDMESSAGE']._serialized_start=49 + _globals['_IDMESSAGE']._serialized_end=79 + _globals['_SESSIONUSERRESPONSE']._serialized_start=81 + _globals['_SESSIONUSERRESPONSE']._serialized_end=155 + _globals['_ROLEREPONSE']._serialized_start=157 + _globals['_ROLEREPONSE']._serialized_end=201 + _globals['_ROLEITEM']._serialized_start=203 + _globals['_ROLEITEM']._serialized_end=260 + _globals['_VALIDATERESPONSE']._serialized_start=262 + _globals['_VALIDATERESPONSE']._serialized_end=295 + _globals['_AUTHMETADATARESPONSE']._serialized_start=297 + _globals['_AUTHMETADATARESPONSE']._serialized_end=376 + _globals['_AUTHSERVICE']._serialized_start=379 + _globals['_AUTHSERVICE']._serialized_end=637 # @@protoc_insertion_point(module_scope) diff --git a/strafesnet/auth_pb2_grpc.py b/strafesnet/auth_pb2_grpc.py index c40147b..4a97fd4 100644 --- a/strafesnet/auth_pb2_grpc.py +++ b/strafesnet/auth_pb2_grpc.py @@ -4,6 +4,7 @@ import grpc import warnings from . import auth_pb2 as auth__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 GRPC_GENERATED_VERSION = '1.64.1' GRPC_VERSION = grpc.__version__ @@ -54,6 +55,11 @@ class AuthServiceStub(object): request_serializer=auth__pb2.IdMessage.SerializeToString, response_deserializer=auth__pb2.ValidateResponse.FromString, _registered_method=True) + self.GetAuthMetadata = channel.unary_unary( + '/auth.AuthService/GetAuthMetadata', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=auth__pb2.AuthMetadataResponse.FromString, + _registered_method=True) class AuthServiceServicer(object): @@ -77,6 +83,12 @@ class AuthServiceServicer(object): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetAuthMetadata(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_AuthServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -95,6 +107,11 @@ def add_AuthServiceServicer_to_server(servicer, server): request_deserializer=auth__pb2.IdMessage.FromString, response_serializer=auth__pb2.ValidateResponse.SerializeToString, ), + 'GetAuthMetadata': grpc.unary_unary_rpc_method_handler( + servicer.GetAuthMetadata, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=auth__pb2.AuthMetadataResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'auth.AuthService', rpc_method_handlers) @@ -186,3 +203,30 @@ class AuthService(object): timeout, metadata, _registered_method=True) + + @staticmethod + def GetAuthMetadata(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/auth.AuthService/GetAuthMetadata', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + auth__pb2.AuthMetadataResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True)