Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Fix: Fixing issues with authorization.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodek committed Oct 2, 2017
1 parent c8510e8 commit 8bbebcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app.request.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class ArcRequest {
* {Boolean} proxy Optional. True for proxy authentication. Default to false.
*/
set auth(opts) {
if (!opts.uid || !opts.passwd || !opts.method) {
if (!(opts.uid || opts.username) || !(opts.passwd || opts.password) || !opts.method) {
console.warn('Invalid auth options. uid, passwd and method are required');
}
opts.domain = opts.domain || undefined;
Expand Down
4 changes: 2 additions & 2 deletions auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
class FetchAuth {
constructor(opts) {
// Login to authorize with
this.uid = opts.uid || undefined;
this.uid = opts.uid || opts.username || undefined;
// Password to authorize with
this.passwd = opts.passwd || undefined;
this.passwd = opts.passwd || opts.password || undefined;
// Aythentication method: basic, ntlm, digest (lowercase)
this.method = opts.method || undefined;
// Optional domain for authentication.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket-fetch",
"version": "2.0.0-rc1",
"version": "2.0.0-rc2",
"license": "LICENSE.txt",
"description": "A HTTP transport based on chrome.socket.tcp API.",
"authors": [
Expand Down

0 comments on commit 8bbebcc

Please sign in to comment.