{"_id":"passport-atlassian-oauth","_rev":"12-f3a2b56deb429e92fef843f27026ccce","name":"passport-atlassian-oauth","description":"Atlassian Oauth authentication strategy for Passport.","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"passport-atlassian-oauth","version":"0.0.1","description":"Atlassian Oauth authentication strategy for Passport.","author":{"name":"Andreas Knecht","email":"knecht.andreas@gmail.com"},"repository":{"type":"git","url":"https://bitbucket.org/knecht_andreas/passport-atlassian-oauth.git"},"main":"./lib/passport-atlassian-oauth","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.2"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","atlassian","oauth","auth","authn","authentication","identity"],"_id":"passport-atlassian-oauth@0.0.1","dist":{"shasum":"98620f6b4745636e45c267ee1924bb6c8a854122","tarball":"https://registry.npmjs.org/passport-atlassian-oauth/-/passport-atlassian-oauth-0.0.1.tgz","integrity":"sha512-TTWWCmgeAy2qyz2T1jVo0lWUyPiOaAl262OpU5oXtkqNNf1NNt08gM1w0mBFVe18YtZancefeeb4pAejZMpeQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/L/Tkn4WOOUYHWJHdIJdnl8qwDoCw7nL8g6k6Cum/EAIhAKO0Q2xNaxMylQYreOPC/5UqPX2DExBi9NDHVa8NMzgL"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"andreask","email":"andreask@atlassian.com"},"maintainers":[{"name":"andreask","email":"andreask@atlassian.com"}]},"0.0.2":{"name":"passport-atlassian-oauth","version":"0.0.2","description":"Atlassian Oauth authentication strategy for Passport.","author":{"name":"Andreas Knecht","email":"knecht.andreas@gmail.com"},"repository":{"type":"git","url":"https://bitbucket.org/knecht_andreas/passport-atlassian-oauth.git"},"main":"./lib/passport-atlassian-oauth","dependencies":{"pkginfo":"0.2.x","passport-oauth":"~0.1.2"},"engines":{"node":">= 0.4.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"keywords":["passport","atlassian","oauth","auth","authn","authentication","identity"],"devDependencies":{"ejs":"^2.3.2","express":"^3.21.1","passport":"^0.2.2"},"gitHead":"a2400b0a171b7ad3cd65cf80acc96691aa06d56a","_id":"passport-atlassian-oauth@0.0.2","scripts":{},"_shasum":"c452fc7b8d21b7f14ade8637dc4cbf20a233441d","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.38","_npmUser":{"name":"sreuter","email":"s.reuter@geek-it.de"},"dist":{"shasum":"c452fc7b8d21b7f14ade8637dc4cbf20a233441d","tarball":"https://registry.npmjs.org/passport-atlassian-oauth/-/passport-atlassian-oauth-0.0.2.tgz","integrity":"sha512-BtZC1Y9TTZWoFBUOG7ZEcVqPsXczYZstceCV0ZCwZO8CG7RfDYK6/SBIA8ieV/IofPrp+7vaR3BeFTbeHD31fg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+rpm+lAD0JHFNP7/gyuNJuDKkbZvFRN1/cQ5Opf0XiwIgRnBcydZR/9G1zXdUu9jeJddjVHrX7IZODO99a4dBMWg="}]},"maintainers":[{"name":"andreask","email":"knecht.andreas@gmail.com"},{"name":"sreuter","email":"s.reuter@geek-it.de"}]}},"readme":"# Passport Atlassian OAuth\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Atlassian Applications](http://www.atlassian.com/)\nusing the OAuth 1.0 API.\n\nThis module lets you authenticate using Atlassian Applications in your Node.js applications.\nBy plugging into Passport, Atlassian Oauth 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-atlassian-oauth\n\n## Usage\n\n#### Configure Strategy\n\nThe Atlassian OAuth authentication strategy authenticates users using an Atlassian Application \naccount and OAuth 1.0 tokens.  The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a applicationURL, consumerKey, and callback URL.\n\n    passport.use(new AtlassianOAuthStrategy({\n            applicationURL:\"http://localhost:2990/jira\",\n            callbackURL:\"http://localhost:5000/auth/atlassian-oauth/callback\",\n            consumerKey:\"atlassian-oauth-sample\",\n            consumerSecret:\"<RSA private key>\",\n      },\n      function(token, tokenSecret, profile, done) {\n        User.findOrCreate({ userid: profile.id }, function (err, user) {\n          return done(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'atlassian-oauth'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.get('/auth/atlassian-oauth',\n        passport.authenticate('atlassian-oauth'),\n        function (req, res) {\n            // The request will be redirected to the Atlassian app for authentication, so this\n            // function will not be called.\n        });\n       \n    app.get('/auth/atlassian-oauth/callback',\n        passport.authenticate('atlassian-oauth', { failureRedirect:'/login' }),\n        function (req, res) {\n            res.redirect('/');\n        });\n\n#### Atlassian Application Setup\n\nConfigure an [application link](https://confluence.atlassian.com/display/JIRA/Configuring+Application+Links) in the \nAtlassian Application pointing back to your NodeJS app.\n\nIn this application link  configure [OAuth Authentication](https://confluence.atlassian.com/display/JIRA/Configuring+OAuth+Authentication+for+an+Application+Link) \nfor incoming authentication.  Set the `consumer key` to the same value that you used in your AtlassianOAuthStrategy.\nProvide a matching RSA public key for the private key in use in your NodeJS application and finally configure a callback\nurl that will redirect to `<NodeJS base URL>/auth/atlassian-oauth/callback` (given the example above). \n\n\n## Examples\n\nFor a complete, working example, refer to the [login example](https://bitbucket.org/knecht_andreas/passport-atlassian-oauth/src/master/examples/login).\n\n## Issues\n\nCurrently this implementation only works with JIRA.  Unfortunately there isn't yet an Atlassian cross-product API to retrieve\nuser details to populate the passport profile that's the same in all applications. Other Atlassian applications may\nbe added at a later date (changing the REST calls in strategy.js ```userProfile()```).\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Andreas Knecht\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.","maintainers":[{"name":"andreask","email":"knecht.andreas@gmail.com"},{"name":"sreuter","email":"s.reuter@geek-it.de"}],"time":{"modified":"2022-06-23T12:16:57.604Z","created":"2014-10-14T00:46:51.947Z","0.0.1":"2014-10-14T00:46:52.707Z","0.0.2":"2015-07-09T06:46:00.647Z"},"readmeFilename":"README.md","keywords":["passport","atlassian","oauth","auth","authn","authentication","identity"],"repository":{"type":"git","url":"https://bitbucket.org/knecht_andreas/passport-atlassian-oauth.git"},"author":{"name":"Andreas Knecht","email":"knecht.andreas@gmail.com"},"users":{"tomaskenis":true,"sasquatch":true}}