Commit de008127 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix bearer token support

parent e1c8663a
......@@ -19,7 +19,7 @@ module ImageRegistry
if options[:user] && options[:password]
builder.request(:basic_auth, options[:user].to_s, options[:password].to_s)
elsif options[:token]
builder.request(:authentication, :Bearer, options[:token].to_s)
builder.request(:authorization, :bearer, options[:token].to_s)
end
builder.adapter :net_http
......
......@@ -25,7 +25,7 @@ module ImageRegistry
def tags
return @tags if defined?(@tags)
return unless manifest && manifest['tags']
return [] unless manifest && manifest['tags']
@tags = manifest['tags'].map do |tag|
ImageRegistry::Tag.new(self, tag)
end
......
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