Skip to content

Commit

Permalink
Merge 0e95560 into 9dfc93e
Browse files Browse the repository at this point in the history
  • Loading branch information
chaseadam committed Mar 27, 2019
2 parents 9dfc93e + 0e95560 commit 0ef892d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -132,11 +132,11 @@ export default class ProvidersModuleFactory {
const urlObject = new URL(url);

if (urlObject.username && urlObject.password) {
authToken = Buffer.from(`${urlObject.username}:${urlObject.password}`, 'base64');
authToken = Buffer.from(`${urlObject.username}:${urlObject.password}`).toString('base64');
headers.authorization = `Basic ${authToken}`;
}

if (urlObject.auth) {
else if (urlObject.auth) {
headers.authorization = Buffer.from(urlObject.auth, 'base64');
}

Expand Down
Expand Up @@ -76,7 +76,7 @@ describe('ProvidersModuleFactoryTest', () => {
'ws://username:password@hallo:5544',
'string',
null,
{authorization: Buffer.from([186, 199, 171, 157, 169, 158, 165, 171, 44, 194, 138, 221])},
{authorization: 'Basic dXNlcm5hbWU6cGFzc3dvcmQ='},
null,
'string'
);
Expand Down

0 comments on commit 0ef892d

Please sign in to comment.