Skip to content

Commit

Permalink
Support http-basic-auth via basicAuth setting
Browse files Browse the repository at this point in the history
use settings.basicAuth.username and settings.basicAuth.password to
configure basic authentication.
  • Loading branch information
staabm committed Jul 12, 2016
1 parent 5f051d8 commit c84f4ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/wordpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ function Client( settings ) {
// via settings.host
headers: {
Host: parsedUrl.host
}
},
basic_auth: settings.basicAuth ? {
user: settings.basicAuth.username,
pass: settings.basicAuth.password
} : null,
});
this.blogId = settings.blogId || 0;
this.username = settings.username;
Expand Down

0 comments on commit c84f4ac

Please sign in to comment.