Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/174479

Change subject: Switch back to official passport-drupal
......................................................................

Switch back to official passport-drupal

Our changes got upstreamed!

Change-Id: Id156a4990e65318132c634b7918d07d634766130
---
M passport-drupal/README.md
M passport-drupal/package.json
2 files changed, 22 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash/node_modules 
refs/changes/79/174479/1

diff --git a/passport-drupal/README.md b/passport-drupal/README.md
index 8f1fea3..add56ec 100755
--- a/passport-drupal/README.md
+++ b/passport-drupal/README.md
@@ -27,6 +27,7 @@
         consumerKey: DRUPAL_CONSUMER_KEY,
         consumerSecret: DRUPAL_CONSUMER_SECRET,
         providerURL: "http://drupal.example.com";,
+        providerBackendURL: "http://private.drupal.example.com";, // <---- Used 
for server to server requests such as token verification and profile requests. 
Defaults to providerURL.
         resourceEndpoint: "oauthlogin/api/user/info" // <---- optional. 
Defaults to `rest/system/connect`
       },
       function(token, tokenSecret, profile, done) {
diff --git a/passport-drupal/package.json b/passport-drupal/package.json
index 0b85bcf..51eeef2 100755
--- a/passport-drupal/package.json
+++ b/passport-drupal/package.json
@@ -1,6 +1,6 @@
 {
   "name": "passport-drupal",
-  "version": "0.3.2",
+  "version": "0.3.3",
   "description": "Drupal authentication strategy for Passport.",
   "author": {
     "name": "Victor Kareh",
@@ -27,11 +27,27 @@
     "identity",
     "oauth"
   ],
-  "readme": "# Passport-Drupal\n\n[Passport](http://passportjs.org/) strategy 
for authenticating with [Drupal](http://drupal.org/)\nwebsites that use the 
[Services](http://drupal.org/project/services) 
and\n[OAuth](http://drupal.org/project/oauth) modules.\n\nThis module lets you 
authenticate using a Drupal website in your Node.js\napplications. By plugging 
into Passport, Drupal authentication can be easily and\nunobtrusively 
integrated into any application or framework that 
supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, 
including\n[Express](http://expressjs.com/).\n\n## Installation\n\n    $ npm 
install passport-drupal\n\n## Usage\n\n#### Configure Strategy\n\nThe Drupal 
OAuth authentication strategy authenticates users using a Drupal\naccount and 
OAuth tokens.  The strategy requires a `verify` callback, which\naccepts these 
credentials and calls `done` providing a user, as well as\n`options` specifying 
a consumer key, consumer secret, and callback URL.\n\n    passport.use(new 
Strategy({\n        consumerKey: DRUPAL_CONSUMER_KEY,\n        consumerSecret: 
DRUPAL_CONSUMER_SECRET,\n        providerURL: \"http://drupal.example.com\",\n  
      resourceEndpoint: \"oauthlogin/api/user/info\" // <---- optional. 
Defaults to `rest/system/connect`\n      },\n      function(token, tokenSecret, 
profile, done) {\n        profile.oauth = { token: token, token_secret: 
tokenSecret };\n        done(null, profile);\n      }\n    ));\n\n#### 
Authenticate Requests\n\nUse `passport.authenticate()`, specifying the 
`'drupal'` strategy, to\nauthenticate requests.\n\nFor example, as route 
middleware in an 
[Express](http://expressjs.com/)\napplication:\n\n````JavaScript\napp.get('/auth/drupal',\n
  passport.authenticate('drupal'),\n  function(req, res) {\n    // The request 
will be redirected to the Drupal website for\n    // authentication, so this 
function will not be called.\n});\n\napp.get('/auth/drupal/callback',\n  
passport.authenticate('drupal', { failureRedirect: '/login' }),\n  
function(req, res) {\n    // Successful authentication, redirect home.\n    
res.redirect('/');\n});\n````\n\nIf you want to store access tokens locally 
(e.g. in a persistent session store),\nyou can add something like the following 
to prevent requesting new ones 
every\ntime:\n\n````JavaScript\napp.get('/auth/drupal/login', function(req, 
res, next) {\n  var tokens = req.session['my-session-key'];\n  if 
(req.cookies['my-cookie-key'] && tokens) {\n    // If all the data is there, 
load user profile\n    strategy.userProfile(tokens.oauth_token, 
tokens.oauth_token_secret, {}, function(err, user) {\n      if (err) return 
res.redirect('/auth/drupal');\n      req.session.user = user;\n      
res.redirect('/');\n    });\n  } else {\n    // If not, start OAuth 
authentication\n    res.redirect('/auth/drupal');\n  }\n});\n````\n\n## Drupal 
configuration\n\n_These instructions are for Drupal 7. For Drupal 6, refer to 
this issue: 
[https://github.com/mixmarket/passport-drupal/issues/1](https://github.com/mixmarket/passport-drupal/issues/1#issuecomment-19986969)_\n\n*
 Install the following modules:\n    - oauth_common (bundled with 
[OAuth](http://drupal.org/project/oauth))\n    - oauth_common_providerui 
(bundled with [OAuth](http://drupal.org/project/oauth))\n    - 
[Services](http://drupal.org/project/services)\n    - rest_server (bundled with 
[Services](http://drupal.org/project/services))\n    - services_oauth (bundled 
with [Services](http://drupal.org/project/services))\n* Go to 
`admin/config/services/oauth` and check on _Enable the oauth provider_.\n* On 
that same page, click on Add Context\n    - Under _Signature Methods_, check 
_HMAC-SHA1_ only\n    - Under _Authorization Options_, check on _Disable 
authorization level selection_.\n    - Add an _Authorization Level_ and check 
on _Selected by default_.\n* Go to `admin/structure/services` and click _Add_\n 
   - Enter an endpoint path as both your machine name and path (_rest_ is a 
good option).\n    - Select _REST_ as your Server.\n    - Under 
_Authentication_, check _OAuth authentication_.\n    - Save\n* On the resulting 
page, click to Edit your new Service\n    - On the _Server_ tab\n        * 
Under _Response formatters_, select _json_.\n        * Under _Request parsing_, 
select _application/json_ and _application/x-www-form-urlencoded_.\n    - On 
the _Authentication_ tab\n        * OAuth context: select context created 
above\n        * Default required OAuth Authorization level: select level 
created above\n        * Default required authentication: _Consumer key and 
access token, also known as 3-legged OAuth_\n    - On the _Resources_ tab\n     
   * Check on _system > connect_\n        * Select _Default_ for the 
authentication options\n* Go to `user/1/oauth/consumer` and click _Add 
consumer_\n    - On _Callback url_, enter your node.js callback URL (typically 
_http://node.example.com/auth/drupal/callback_)\n    - On _Application 
context_, select the context created above\n* Go back to 
`user/1/oauth/consumer` and click _Edit_ on the new consumer to view the 
consumer Key and Secret.\n\n## Credits\n\nThis module is developed by [Victor 
Kareh](http://github.com/vkareh) and is\nheavily based on work by [Jared 
Hanson](http://github.com/jaredhanson)\n\n## License\n\n(The MIT 
License)\n\nCopyright (c) 2011 Victor Kareh\n\nPermission is hereby granted, 
free of charge, to any person obtaining a copy of\nthis software and associated 
documentation files (the \"Software\"), to deal in\nthe Software without 
restriction, including without limitation the rights to\nuse, copy, modify, 
merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, 
and to permit persons to whom the Software is furnished to do so,\nsubject to 
the following conditions:\n\nThe above copyright notice and this permission 
notice shall be included in all\ncopies or substantial portions of the 
Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 
EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
DEALINGS IN THE SOFTWARE.\n",
-  "readmeFilename": "README.md",
   "bugs": {
     "url": "https://github.com/mixmarket/passport-drupal/issues";
   },
-  "_id": "passport-drupal@0.3.2",
-  "_from": "passport-drupal@"
+  "_id": "passport-drupal@0.3.3",
+  "dist": {
+    "shasum": "3594a4771accb5e5bcd825aa9769c7ead9c39e63",
+    "tarball": 
"http://registry.npmjs.org/passport-drupal/-/passport-drupal-0.3.3.tgz";
+  },
+  "_from": "passport-drupal@0.3.3",
+  "_npmVersion": "1.3.11",
+  "_npmUser": {
+    "name": "vkareh",
+    "email": "vka...@vkareh.net"
+  },
+  "maintainers": [
+    {
+      "name": "vkareh",
+      "email": "vka...@vkareh.net"
+    }
+  ],
+  "directories": {},
+  "_shasum": "3594a4771accb5e5bcd825aa9769c7ead9c39e63",
+  "_resolved": 
"https://registry.npmjs.org/passport-drupal/-/passport-drupal-0.3.3.tgz";
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/174479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id156a4990e65318132c634b7918d07d634766130
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash/node_modules
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to