From c5a015df65da03d0e09faa3d3762382ca07a46c6 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sat, 25 May 2019 10:09:30 +0200
Subject: [PATCH] refactor: Authorization -> authorization

---
 lib/datasource/docker/index.js    | 4 ++--
 lib/datasource/packagist/index.js | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js
index 83cd7e40fc..f9e0b8d49c 100644
--- a/lib/datasource/docker/index.js
+++ b/lib/datasource/docker/index.js
@@ -55,7 +55,7 @@ async function getAuthHeaders(registry, repository) {
       const auth = Buffer.from(`${opts.username}:${opts.password}`).toString(
         'base64'
       );
-      opts.headers = { Authorization: `Basic ${auth}` };
+      opts.headers = { authorization: `Basic ${auth}` };
     }
 
     if (authenticateHeader.scheme.toUpperCase() === 'BASIC') {
@@ -76,7 +76,7 @@ async function getAuthHeaders(registry, repository) {
       return null;
     }
     return {
-      Authorization: `Bearer ${token}`,
+      authorization: `Bearer ${token}`,
     };
   } catch (err) /* istanbul ignore next */ {
     if (err.statusCode === 401) {
diff --git a/lib/datasource/packagist/index.js b/lib/datasource/packagist/index.js
index 34d94ed114..3a94d75c73 100644
--- a/lib/datasource/packagist/index.js
+++ b/lib/datasource/packagist/index.js
@@ -73,7 +73,7 @@ async function getPackagistFile(regUrl, file) {
   const { key, sha256 } = file;
   const fileName = key.replace('%hash%', sha256);
   const opts = getHostOpts(regUrl);
-  if (opts.auth || (opts.headers && opts.headers.Authorization)) {
+  if (opts.auth || (opts.headers && opts.headers.authorization)) {
     return (await got(regUrl + '/' + fileName, opts)).body;
   }
   const cacheNamespace = 'datasource-packagist-files';
-- 
GitLab