We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80af3ae commit 62eaed0Copy full SHA for 62eaed0
image/client.py
@@ -139,7 +139,7 @@ def get_auth_token(
139
response, and MUST include the www-authenticate header
140
141
Args:
142
- res (Type[requests.Response]): The response from the registry API
+ res (requests.Response): The response from the registry API
143
reg_auth (str): The auth retrieved for the registry
144
145
Returns:
@@ -168,9 +168,11 @@ def get_auth_token(
168
169
# Send the request to the auth service, parse the token from the
170
# response
171
- headers = {
172
- 'Authorization': f"Basic {reg_auth}"
173
- }
+ headers = {}
+ if len(reg_auth) > 0:
+ headers = {
174
+ 'Authorization': f"Basic {reg_auth}"
175
+ }
176
token_res = requests.get(auth_url, headers=headers)
177
token_res.raise_for_status()
178
token_json = token_res.json()
0 commit comments