Skip to content

Commit 4b05927

Browse files
Merge pull request #141 from adamtheturtle/better-auth
Improve auth validators
2 parents 36b0da3 + af75d7c commit 4b05927

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mock_vws/_query_validators/auth_validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def validate_auth_header_number_of_parts(
8686
@wrapt.decorator
8787
def validate_client_key_exists(
8888
wrapped: Callable[..., str],
89-
instance: Any,
89+
instance: Any, # pylint: disable=unused-argument
9090
args: Tuple[_RequestObjectProxy, _Context],
9191
kwargs: Dict,
9292
) -> str:
@@ -106,8 +106,8 @@ def validate_client_key_exists(
106106
request, context = args
107107

108108
header = request.headers['Authorization']
109-
before_signature, _ = header.split(b':')
110-
_, access_key = before_signature.split(b' ')
109+
first_part, signature = header.split(b':')
110+
_, access_key = first_part.split(b' ')
111111
for database in instance.databases:
112112
if access_key == database.client_access_key:
113113
return wrapped(*args, **kwargs)

0 commit comments

Comments
 (0)