Kaydet (Commit) ebcfab0a authored tarafından Matt Outten's avatar Matt Outten

Switch to send full AuthConfig object for build action

In order to support the docker API for version 1.7+, this command
changes the way the `X-Registry-Config` header is sent when attempting
to build an image.
üst 946eb964
......@@ -102,12 +102,6 @@ def encode_header(auth):
return base64.b64encode(auth_json)
def encode_full_header(auth):
""" Returns the given auth block encoded for the X-Registry-Config header.
"""
return encode_header({'configs': auth})
def parse_auth(entries):
"""
Parses authentication entries
......
......@@ -139,7 +139,7 @@ class Client(clientbase.ClientBase):
if self._auth_configs:
if headers is None:
headers = {}
headers['X-Registry-Config'] = auth.encode_full_header(
headers['X-Registry-Config'] = auth.encode_header(
self._auth_configs
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment