Skip to content

Commit 74c707f

Browse files
authored
Merge pull request #9 from IBM/fix_register_gateway
gateway registration fix
2 parents 4b741e9 + a113005 commit 74c707f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mcpgateway/utils/services_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def encode_auth(auth_value: dict) -> str:
4343
Returns:
4444
str: A base64-url-safe encrypted string representing the dictionary, or None if input is None.
4545
"""
46-
if auth_value is None:
46+
if not auth_value:
4747
return None
4848
plaintext = json.dumps(auth_value)
4949
key = get_key()
@@ -65,7 +65,7 @@ def decode_auth(encoded_value: str) -> dict:
6565
Returns:
6666
dict: The decrypted authentication dictionary, or empty dict if input is None.
6767
"""
68-
if encoded_value is None:
68+
if not encoded_value:
6969
return {}
7070
key = get_key()
7171
aesgcm = AESGCM(key)

0 commit comments

Comments
 (0)