{"_id":"passport-azure-ad-oauth2","_rev":"10-c596a809f02134a401941665d1abb4e5","name":"passport-azure-ad-oauth2","description":"Passport strategy for authenticating with Azure AD using the OAuth 2.0 protocol.","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"passport-azure-ad-oauth2","version":"0.0.1","description":"Passport strategy for authenticating with Azure AD using the OAuth 2.0 protocol.","keywords":["passport","waad","oauth","azure active directory","azure ad","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/auth0/passport-azure-ad-oauth2.git"},"bugs":{"url":"http://github.com/auth0/passport-azure-ad-oauth2/issues"},"author":{"name":"Auth0","email":"support@auth0.com","url":"http://www.auth0.com/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-azure-ad-oauth2","dependencies":{"passport-oauth":"1.0.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x"},"scripts":{"test":"mocha --reporter spec test/*.test.js"},"homepage":"https://github.com/auth0/passport-azure-ad-oauth2","gitHead":"4c3da3292c944024078d4742804565bf01dcedf3","_id":"passport-azure-ad-oauth2@0.0.1","_shasum":"c289ce9039572533628d8d327efe51ae8a8529ec","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"},"maintainers":[{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"}],"dist":{"shasum":"c289ce9039572533628d8d327efe51ae8a8529ec","tarball":"https://registry.npmjs.org/passport-azure-ad-oauth2/-/passport-azure-ad-oauth2-0.0.1.tgz","integrity":"sha512-nju1yTIRI7Syvn2vgGNkm3Saz570jWDrsye71DlXyRdQ83KygS0wCBwpbojTq/6hDkyOh53Rv3nK0AdDGs4ikw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCtniaT7J7DkvKkKYL4Vech1c5jq5OIn7HRgKLY5OSiJwIfVDjWCYTdN2m7F27t/syhQCM6m4vMmHv3caP+Ti+R4g=="}]}},"0.0.2":{"name":"passport-azure-ad-oauth2","version":"0.0.2","description":"Passport strategy for authenticating with Azure AD using the OAuth 2.0 protocol.","keywords":["passport","waad","oauth","azure active directory","azure ad","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/auth0/passport-azure-ad-oauth2.git"},"bugs":{"url":"http://github.com/auth0/passport-azure-ad-oauth2/issues"},"author":{"name":"Auth0","email":"support@auth0.com","url":"http://www.auth0.com/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-azure-ad-oauth2","dependencies":{"passport-oauth":"1.0.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x"},"scripts":{"test":"mocha --reporter spec test/*.test.js"},"homepage":"https://github.com/auth0/passport-azure-ad-oauth2","gitHead":"bd0db490a253b080f8ef03f728e67e4de3aff865","_id":"passport-azure-ad-oauth2@0.0.2","_shasum":"55dbefa9a42c31411de30b9a26f35e288cc383fa","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"},"maintainers":[{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"}],"dist":{"shasum":"55dbefa9a42c31411de30b9a26f35e288cc383fa","tarball":"https://registry.npmjs.org/passport-azure-ad-oauth2/-/passport-azure-ad-oauth2-0.0.2.tgz","integrity":"sha512-KlV1quqBrNjoTtxeFzAJacjyHn1U/erTLjrxTLI44hi7fnf9M6CjcX4YCjuDr0vjBDQ4WNIa5Ai5I7Jcf2l7QQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsuvieeN8Bdt4o0Jjuokn8/K5U2cE2GH2+f26wZLo9UAiEAtEuLxuizb4TjrdUzELmdaXdB9j//QgNB9ENxb26yJZ0="}]}},"0.0.3":{"name":"passport-azure-ad-oauth2","version":"0.0.3","description":"Passport strategy for authenticating with Azure AD using the OAuth 2.0 protocol.","keywords":["passport","waad","oauth","azure active directory","azure ad","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/auth0/passport-azure-ad-oauth2.git"},"bugs":{"url":"http://github.com/auth0/passport-azure-ad-oauth2/issues"},"author":{"name":"Auth0","email":"support@auth0.com","url":"http://www.auth0.com/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-azure-ad-oauth2","dependencies":{"passport-oauth":"1.0.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x"},"scripts":{"test":"mocha --reporter spec test/*.test.js"},"homepage":"https://github.com/auth0/passport-azure-ad-oauth2","gitHead":"ebfc085c41dd32881f3f239cb39bc1f5e370d66f","_id":"passport-azure-ad-oauth2@0.0.3","_shasum":"cfc49de0252faa9ec3760269e86f57126cb17f5f","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"},"maintainers":[{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"}],"dist":{"shasum":"cfc49de0252faa9ec3760269e86f57126cb17f5f","tarball":"https://registry.npmjs.org/passport-azure-ad-oauth2/-/passport-azure-ad-oauth2-0.0.3.tgz","integrity":"sha512-SXyVbApP2TxG9XVaYKcrSF9rwyTsLMtkhomqaCGRXxSL6sDKkOXq/gcGyPw26vWWKAcN2YpofZmtoGqenfHVjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGq9mgxYhtDZmSemyNPUh3lj9KjrRSsVhRj20eMsgscwIgOxwrvcF2zD3+L/vWVmkP6YJvvvdmts3ncwDkPSFw3bo="}]}},"0.0.4":{"name":"passport-azure-ad-oauth2","version":"0.0.4","description":"Passport strategy for authenticating with Azure AD using the OAuth 2.0 protocol.","keywords":["passport","waad","oauth","azure active directory","azure ad","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/auth0/passport-azure-ad-oauth2.git"},"bugs":{"url":"http://github.com/auth0/passport-azure-ad-oauth2/issues"},"author":{"name":"Auth0","email":"support@auth0.com","url":"http://www.auth0.com/"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"main":"./lib/passport-azure-ad-oauth2","dependencies":{"passport-oauth":"1.0.x"},"devDependencies":{"mocha":"1.x.x","chai":"1.x.x"},"scripts":{"test":"mocha --reporter spec test/*.test.js"},"homepage":"https://github.com/auth0/passport-azure-ad-oauth2","gitHead":"59f1fdd9abc0865a3103ac2f3a46da369cb42854","_id":"passport-azure-ad-oauth2@0.0.4","_shasum":"1a09d8869efd4afd095116e228941961b3a5c120","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"},"maintainers":[{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"}],"dist":{"shasum":"1a09d8869efd4afd095116e228941961b3a5c120","tarball":"https://registry.npmjs.org/passport-azure-ad-oauth2/-/passport-azure-ad-oauth2-0.0.4.tgz","integrity":"sha512-yjwi0qXzGPIrR8yI5mBql2wO6tf/G5+HAFllkwwZ6f2EBCVvRv5z+6CwQeBvlrDbFh8RCXdj/IfB17r8LYDQQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCj4yW+WYYERupc+dgOlzkhrs6l5sGpJ605lOvTpqPCDQIhAMGSphJyTVK2XGoViOAObFoEsp+39JGzPN/7yvwK6NtY"}]}}},"readme":"# Passport-azure-ad-oauth2\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Azure AD](http://msdn.microsoft.com/en-us/library/azure/dn645545.aspx)\nusing the OAuth 2.0 protocol.\n\n## Install\n\n    $ npm install passport-azure-ad-oauth2\n\n## Usage\n\n#### Configure Strategy\n\nThe Azure AD OAuth 2.0 authentication strategy authenticates requests by delegating to Azure AD using the OAuth 2.0 protocol.\n\nApplications must supply a `verify` callback which accepts an `accessToken`, `refresh_token`, `params` and service-specific `profile`, and then calls the `done` callback supplying a `user`, which should be set to `false` if the credentials are not valid.  If an exception occured, `err` should be set.\n\n##### Options\n\n* `clientID`: specifies the client id of the application that is registered in Azure Active Directory.\n* `clientSecret`: secret used to establish ownership of the client Id.\n* `callbackURL`: URL to which Azure AD will redirect the user after obtaining authorization.\n* `resource`: [optional] the App ID URI of the web API (secured resource).\n* `tenant`: [optional] tenant domain (e.g.: contoso.onmicrosoft.com).\n* `useCommonEndpoint`: [optional] use \"https://login.windows.net/common\" instead of default endpoint (https://login.windows.net/{tenant}). This is typically enabled if you're using this for a Multi-tenant application in Azure AD (Default: `false`).\n\n```javascript\npassport.use(new AzureAdOAuth2Strategy({\n  clientID: '{YOUR_CLIENT_ID}',\n  clientSecret: '{YOUR_CLIENT_SECRET}',\n  callbackURL: 'https://www.example.net/auth/azureadoauth2/callback',\n  resource: '00000002-0000-0000-c000-000000000000',\n  tenant: 'contoso.onmicrosoft.com'\n},\nfunction (accessToken, refresh_token, params, profile, done) {\n  var waadProfile = profile || jwt.decode(params.id_token, '', true);\n\n  User.findOrCreate({ id: waadProfile.upn }, function (err, user) {\n    done(err, user);\n  });\n}));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'azure_ad_oauth2'` strategy, to authenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/) application:\n\n```javascript\napp.get('/auth/azureadoauth2',\n  passport.authenticate('azure_ad_oauth2'));\n\napp.get('/auth/azureadoauth2/callback', \n  passport.authenticate('azure_ad_oauth2', { failureRedirect: '/login' }),\n  function (req, res) {\n    // Successful authentication, redirect home.\n    res.redirect('/');\n  });\n```\n\n## Tests\n\n    $ npm install\n    $ npm test\n    \n## Issue Reporting\n\nIf you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.\n\n## Credits\n\n  - [Jared Hanson](http://github.com/jaredhanson)\n  - [Azure AD Team](https://github.com/AzureAD/azure-activedirectory-library-for-nodejs)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n","maintainers":[{"name":"iaco","email":"sebastian.iacomuzzi@gmail.com"}],"time":{"modified":"2022-06-23T12:18:51.079Z","created":"2014-09-19T21:41:11.650Z","0.0.1":"2014-09-19T21:41:11.650Z","0.0.2":"2014-09-19T23:25:19.338Z","0.0.3":"2014-09-20T15:44:33.077Z","0.0.4":"2015-02-10T19:06:41.211Z"},"homepage":"https://github.com/auth0/passport-azure-ad-oauth2","keywords":["passport","waad","oauth","azure active directory","azure ad","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git://github.com/auth0/passport-azure-ad-oauth2.git"},"author":{"name":"Auth0","email":"support@auth0.com","url":"http://www.auth0.com/"},"bugs":{"url":"http://github.com/auth0/passport-azure-ad-oauth2/issues"},"readmeFilename":"README.md"}