Skip to content

Commit 7c3b3e3

Browse files
authored
Merge pull request #39 from MShekow/fix/acr-compatibility
Fix compatibility with ACR
2 parents a0940bb + ee8a66a commit 7c3b3e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker_registry_client_async/dockerregistryclientasync.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,9 @@ async def _get_auth_token(
292292
if json_kwargs is None:
293293
json_kwargs = {}
294294
payload = await client_response.json(**json_kwargs)
295-
return payload.get("token", None)
295+
if "token" in payload:
296+
return payload["token"]
297+
return payload.get("access_token", None)
296298

297299
async def _get_client_session(self) -> ClientSession:
298300
"""

0 commit comments

Comments
 (0)