{"_id":"easy-oauth","_rev":"11-41fe32c5874b65705916152cc58d5e9b","name":"easy-oauth","description":"Easy and simple oauth for your Express (node) website","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"easy-oauth","description":"Easy and simple oauth for your Express (node) website","keywords":["oauth","twitter","facebook"],"version":"0.1.0","homepage":"https://github.com/robrighter/easy-oauth","author":{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"},"contributors":[{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"}],"repository":{"type":"git","url":"git://github.com/robrighter/easy-oauth.git"},"bugs":{"url":"http://github.com/isaacs/npm/issues"},"directories":{"lib":"./lib"},"main":"./lib/easy-oauth.js","dependencies":{"connect":">= 0.5.10","oauth":">= 0.9.0","connect-auth":">= 0.2.1","express":">= 1.0.7"},"engines":{"node":"0.4"},"_id":"easy-oauth@0.1.0","_engineSupported":true,"_npmVersion":"0.3.0-8","_nodeVersion":"v0.4.0","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"abb13623c5b307fd04af5eabf2307de2c4ae9528","tarball":"https://registry.npmjs.org/easy-oauth/-/easy-oauth-0.1.0.tgz","integrity":"sha512-nujZT5jYVEJYF4S+JG5e6f5w7/K7a2roZJre0z7TKPEh6LMWHdvXtIehkPy7yf4DfgYE2triYe2nRy/3chWifg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3GXo3A4RLBMPwBT6sEHTtchSVCufRQpqGlAI7FBbVWAiEAzkj6tZghGfKj2zvQFlEmTwZeSHetv3f4MlrxC5c/SpY="}]}},"0.2.0":{"name":"easy-oauth","description":"Easy and simple oauth for your Express (node) website","keywords":["oauth","twitter","facebook"],"version":"0.2.0","homepage":"https://github.com/robrighter/easy-oauth","author":{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"},"contributors":[{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"}],"repository":{"type":"git","url":"git://github.com/robrighter/easy-oauth.git"},"bugs":{"url":"http://github.com/robrighter/easy-oauth/issues"},"directories":{"lib":"./lib"},"main":"./lib/easy-oauth.js","dependencies":{"connect":">= 0.5.10","oauth":">= 0.9.0","connect-auth":">= 0.2.1","express":">= 1.0.7"},"engines":{"node":"0.4"},"_id":"easy-oauth@0.2.0","_engineSupported":true,"_npmVersion":"0.3.15","_nodeVersion":"v0.4.1","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"cb07b603530a32cc47b4c6b1ac4a6ca1d6345c76","tarball":"https://registry.npmjs.org/easy-oauth/-/easy-oauth-0.2.0.tgz","integrity":"sha512-SfhM/IcbAvydRClThSlaSYPofz7qj25ZH7/3cY52N/CxujTFchwn4CzWwCwG1hiQ0JqtT1egPuJm9dBso4NsdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcXUqoHLHJDvhMuv3IUZdegvQsI2OG09k+JLJbxN92cAiEAuao4WLJxePQ4XwDuLPCl66v908A1+fQad8Ll/L0Yxyg="}]}},"0.2.1":{"name":"easy-oauth","description":"Easy and simple oauth for your Express (node) website","keywords":["oauth","twitter","facebook"],"version":"0.2.1","homepage":"https://github.com/robrighter/easy-oauth","author":{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"},"contributors":[{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"}],"repository":{"type":"git","url":"git://github.com/robrighter/easy-oauth.git"},"bugs":{"url":"http://github.com/robrighter/easy-oauth/issues"},"directories":{"lib":"./lib"},"main":"./lib/easy-oauth.js","dependencies":{"connect":">= 0.5.10","oauth":">= 0.9.0","connect-auth":">= 0.2.1","express":">= 1.0.7"},"engines":{"node":">= 0.4.0"},"_npmUser":{"name":"robrighter","email":"robrighter@gmail.com"},"_id":"easy-oauth@0.2.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"77d6ae86e45368487a4d34ae31a0f100e51eab96","tarball":"https://registry.npmjs.org/easy-oauth/-/easy-oauth-0.2.1.tgz","integrity":"sha512-4/Ft0s9+/0f38C76udLLunlb5aSFBTunQWvFFiFDK6mxgpzWi5D1G8LmMja0LZ6SjJTyf6uV/nC5vKvJBmbyBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF2CBANAKki3s+N+Jnx5JnSoppdqQoM62e/wrm0Zrwr0AiA5ym6cLDBBStZEsM4bcd/HK/BgE7ckZP+Gs1GMh0ANbA=="}]},"readme":"EasyOAuth\n=================\n\nEasyOAuth is a simple module that is intended to make it very easy to add OAuth to your node.js website.\n\nInstallation\n================= \n\t\n\tnpm install easy-oauth\n\nThis will automatically install the dependencies (connect, oauth, connect-auth, express)\n\n\nUsage\n=================\n\n(1) Setup your OAuth Keys\n\n* Copy down example_keys_file.js from https://github.com/robrighter/easy-oauth/blob/master/example_keys_file.js\n* Rename it to keys_file.js.\n* Edit it to include the keys associated with your oauth application.\n\n\n(2) Usage on the Server Side\n(NOTE: This example assumes you are using express 2.0 however, the module will work with earlier versions of express)\n\n\t\tvar connect = require('connect');\n\t\tvar express = require('express');\n\t\tvar easyoauth = require('easy-oauth');\n\t\tvar server = express.createServer();\n\t\tserver.configure(function(){\n\t\t    server.set('views', __dirname + '/views');\n\t\t    server.use(connect.bodyParser());\n\t\t    server.use(express.cookieParser());\n\t\t    server.use(express.session({secret : \"shhhhhhhhhhhhhh!\"}));\n\t\t    server.use(connect.static(__dirname + '/static'));\n\t\t    server.use(easyoauth(require('./keys_file')));\n\t\t    server.use(server.router);\n\t\t});\n\n(3) Usage on the Client Side\n\n**Include JQuery and the EasyOAuth Client Lib**\n\n\t\t<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></script>\n\t\t<script>!window.jQuery && document.write('<script src=\"js/jquery-1.4.2.min.js\"><\\/script>')</script>\n\t\t<script src=\"/auth/client\"></script>\n\n**Then use it in your client side javascript:**\n\n\t\tvar authcallback = function(data){\n\t\t  $('.details').html('<p>You are all signed in as <strong>'\n\t\t        +data.user.username+\n\t\t        '</strong><br>...and here are some details:'\n\t\t        +JSON.stringify(data.user)+\n\t\t        '</p><a href=\"/logout\">logout</a>').fadeIn('slow');\n\t\t}\n\n\t\t$('#twitbutt').click(function(){\n\t\t  openEasyOAuthBox('twitter',authcallback);\n\t\t});\n\n\t\t$('#facebutt').click(function(){\n\t\t   openEasyOAuthBox('facebook',authcallback);\n\t\t});\n\n(4) Access Protected Resources\n\nOnce a user has OAuth'd in, you will have access to the access keys via the expressjs request object using req.getAuthDetails(). For more information about how to use req.getAuthDetails() to access protected resources, checkout @ciaran_j's https://github.com/ciaranj/connect-auth","maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}]},"0.2.2":{"name":"easy-oauth","description":"Easy and simple oauth for your Express (node) website","keywords":["oauth","twitter","facebook"],"version":"0.2.2","homepage":"https://github.com/robrighter/easy-oauth","author":{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"},"contributors":[{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"}],"repository":{"type":"git","url":"git://github.com/robrighter/easy-oauth.git"},"bugs":{"url":"http://github.com/robrighter/easy-oauth/issues"},"directories":{"lib":"./lib"},"main":"./lib/easy-oauth.js","dependencies":{"connect":">= 0.5.10","oauth":">= 0.9.0","connect-auth":">= 0.2.1","express":">= 1.0.7","ejs":">= 0.7.2"},"engines":{"node":">= 0.4.0"},"readme":"EasyOAuth\n=================\n\nEasyOAuth is a simple module that is intended to make it very easy to add OAuth to your node.js website.\n\nInstallation\n================= \n\t\n\tnpm install easy-oauth\n\nThis will automatically install the dependencies (connect, oauth, connect-auth, express)\n\n\nUsage\n=================\n\n(1) Setup your OAuth Keys\n\n* Copy down example_keys_file.js from https://github.com/robrighter/easy-oauth/blob/master/example_keys_file.js\n* Rename it to keys_file.js.\n* Edit it to include the keys associated with your oauth application.\n\n\n(2) Usage on the Server Side\n(NOTE: This example assumes you are using express 2.0 however, the module will work with earlier versions of express)\n\n\t\tvar connect = require('connect');\n\t\tvar express = require('express');\n\t\tvar easyoauth = require('easy-oauth');\n\t\tvar server = express.createServer();\n\t\tserver.configure(function(){\n\t\t    server.set('views', __dirname + '/views');\n\t\t    server.use(connect.bodyParser());\n\t\t    server.use(express.cookieParser());\n\t\t    server.use(express.session({secret : \"shhhhhhhhhhhhhh!\"}));\n\t\t    server.use(connect.static(__dirname + '/static'));\n\t\t    server.use(easyoauth(require('./keys_file')));\n\t\t    server.use(server.router);\n\t\t});\n\n**Easily check on any route if a user has been authenticated**\n\n\t\tserver.get('/my-account', function(req,res){\n\t\t  req.authenticate(['oauth'], function(error, authenticated) { \n\t\t    if( authenticated ){\n\t\t      //This user is logged in\n\t\t      //render out a page for the logged in user\n\t\t    }\n\t\t    else{\n\t\t      //This user is not logged in\n\t\t      //render out a login page\n\t\t    }\n\t\t  });\n\t\t});\n\n(3) Usage on the Client Side\n\n**Include JQuery and the EasyOAuth Client Lib**\n\n\t\t<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></script>\n\t\t<script>!window.jQuery && document.write('<script src=\"js/jquery-1.4.2.min.js\"><\\/script>')</script>\n\t\t<script src=\"/auth/client\"></script>\n\n**Then use it in your client side javascript:**\n\n\t\tvar authcallback = function(data){\n\t\t  $('.details').html('<p>You are all signed in as <strong>'\n\t\t        +data.user.username+\n\t\t        '</strong><br>...and here are some details:'\n\t\t        +JSON.stringify(data.user)+\n\t\t        '</p><a href=\"/logout\">logout</a>').fadeIn('slow');\n\t\t}\n\n\t\t$('#twitbutt').click(function(){\n\t\t  openEasyOAuthBox('twitter',authcallback);\n\t\t});\n\n\t\t$('#facebutt').click(function(){\n\t\t   openEasyOAuthBox('facebook',authcallback);\n\t\t});\n\n(4) Access Protected Resources\n\nOnce a user has OAuth'd in, you will have access to the access keys via the expressjs request object using req.getAuthDetails(). For more information about how to use req.getAuthDetails() to access protected resources, checkout @ciaran_j's https://github.com/ciaranj/connect-auth","_id":"easy-oauth@0.2.2","dist":{"shasum":"ca3b9dcd8248adc919869f8146e992827cc6b919","tarball":"https://registry.npmjs.org/easy-oauth/-/easy-oauth-0.2.2.tgz","integrity":"sha512-vJ4iy+ecn4VNi73spNoOa3w1lz9D+YDuqe/tNik43UefoOdvqcefp9VRefILUCzWMen0K0dIWl1+5JRElvYAlQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRxQUBUa3JsNmdRpJEXJeC+X3pz9FJ5qnP1LfHjG6ApAiEA0itaAmPoNwXayQqGyq6BSNuECYJYiWYBN8berGhG8z8="}]},"maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}]}},"maintainers":[{"name":"robrighter","email":"robrighter@gmail.com"}],"time":{"modified":"2022-06-16T03:45:30.315Z","created":"2011-02-22T20:32:46.064Z","0.1.0":"2011-02-22T20:32:46.207Z","0.2.0":"2011-03-11T16:35:00.282Z","0.2.1":"2012-01-14T04:16:35.436Z","0.2.2":"2012-07-09T12:07:30.672Z"},"author":{"name":"Rob Righter","email":"robrighter@gmail.com","url":"http://github.com/robrighter"},"repository":{"type":"git","url":"git://github.com/robrighter/easy-oauth.git"}}