From 216fa49f8b614406d20dbd1ae76cc3b6635a7fde Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Thu, 30 Nov 2023 02:07:24 -0500 Subject: [PATCH] aimedb: implement auth keys --- core/aimedb.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/aimedb.py b/core/aimedb.py index c376749..80d6329 100644 --- a/core/aimedb.py +++ b/core/aimedb.py @@ -185,8 +185,9 @@ class AimedbProtocol(Protocol): auth_key = create_sega_auth_key(user_id, req.head.game_id, req.head.store_id, self.config.aimedb.id_secret) if auth_key is not None: auth_key_extra_len = 256 - len(auth_key) - auth_key_full = auth_key.encode() + (b"\0" * auth_key_extra_len) # TODO: impl + auth_key_full = auth_key.encode() + (b"\0" * auth_key_extra_len) self.logger.debug(f"Generated auth token {auth_key}") + ret.auth_key = auth_key_full return ret @@ -256,8 +257,9 @@ class AimedbProtocol(Protocol): auth_key = create_sega_auth_key(user_id, req.head.game_id, req.head.store_id, self.config.aimedb.id_secret) if auth_key is not None: auth_key_extra_len = 256 - len(auth_key) - auth_key_full = auth_key.encode() + (b"\0" * auth_key_extra_len) # TODO: impl + auth_key_full = auth_key.encode() + (b"\0" * auth_key_extra_len) self.logger.debug(f"Generated auth token {auth_key}") + resp.auth_key = auth_key_full return resp