Skip to content

Commit

Permalink
Merge pull request #1 from IONISx/tusbar/add-base-url
Browse files Browse the repository at this point in the history
Add IONISx baseURL option
  • Loading branch information
Bertrand Marron committed Sep 28, 2015
2 parents 96a776e + c69514e commit 04828b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ var Profile = require('./profile');

var Strategy = function (options, verify) {
options = options || {};
options.authorizationURL = options.authorizationURL || 'https://ionisx.com/oauth2/authorize';
options.tokenURL = options.tokenURL || 'https://ionisx.com/oauth2/token';
options.baseURL = options.baseURL || 'https://ionisx.com';
options.authorizationURL = options.authorizationURL || options.baseURL + '/oauth2/authorize';
options.tokenURL = options.tokenURL || options.baseURL + '/oauth2/token';
options.scopeSeparator = options.scopeSeparator || ',';
options.customHeaders = options.customHeaders || {};

Expand All @@ -18,7 +19,7 @@ var Strategy = function (options, verify) {

OAuth2Strategy.call(this, options, verify);
this.name = 'ionisx';
this._userProfileURL = options.userProfileURL || 'https://ionisx.com/api/user/me';
this._userProfileURL = options.userProfileURL || options.baseURL + '/api/user/me';
this._oauth2.useAuthorizationHeaderforGET(true);
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passport-ionisx",
"version": "1.0.0",
"version": "1.1.0",
"description": "Passport strategy for authenticating with IONISx using the OAuth 2.0 API",
"keywords": [
"passport",
Expand Down

0 comments on commit 04828b4

Please sign in to comment.