Skip to content

Commit ce612a5

Browse files
committed
Omit service and scope from log; only check whether access_token is in response
1 parent 2ae77a2 commit ce612a5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

binderhub/registry.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,11 @@ async def _get_token(self, client, token_url, service, scope):
357357
auth_req = httpclient.HTTPRequest(
358358
token_url, headers={"Metadata-Flavor": "Google"}
359359
)
360-
self.log.debug(
361-
f"Getting registry token from {token_url} service={service} scope={scope}"
362-
)
360+
self.log.debug(f"Getting registry token from {token_url}")
363361
auth_resp = await client.fetch(auth_req)
364362
response_body = json.loads(auth_resp.body.decode("utf-8", "replace"))
365363

366-
if "token" in response_body.keys():
367-
token = response_body["token"]
368-
elif "access_token" in response_body.keys():
364+
if "access_token" in response_body.keys():
369365
token = response_body["access_token"]
370366
else:
371367
raise ValueError(f"No token in response from registry: {response_body}")

0 commit comments

Comments
 (0)