{"_id":"@deloittesolutions/passport-azure-ad","_rev":"5-2b8f1e652eb4e8911dd33d73f8c3b611","name":"@deloittesolutions/passport-azure-ad","description":"WSFED/SAMLP/OIDC/Bearer Passport strategies for Azure Active Directory","dist-tags":{"latest":"2.0.5"},"versions":{"2.0.4":{"name":"@deloittesolutions/passport-azure-ad","version":"2.0.4","license":"MIT","keywords":["saml","samlp","wsfed","azure active directory","aad","adfs","sso","oidc","bearer","shibboleth"],"description":"WSFED/SAMLP/OIDC/Bearer Passport strategies for Azure Active Directory","author":{"name":"azuread","email":"nugetaad@microsoft.com","url":"http://microsoft.com/"},"repository":{"type":"git","url":"git+ssh://git@github.com/AzureAD/passport-azure-ad.git"},"main":"./lib","devDependencies":{"body-parser":"^1.15.0","cookie-parser":"^1.4.0","eslint":"^2.9.0","eslint-config-oniyi":"^3.0.0","express-session":"^1.12.1","grunt":"^1.0.1","grunt-contrib-jshint":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-contrib-watch":"^1.0.0","grunt-mocha-test":"^0.12.7","grunt-eslint":"^18.1.0","nodeunit":"^0.9.1","mocha":"^3.0.2","chai":"2.x.x","chai-passport-strategy":"1.x.x"},"dependencies":{"async":"^1.5.2","base64url":"^2.0.0","bunyan":"^1.8.0","cache-manager":"^2.0.0","jsonwebtoken":"^6.2.0","jws":"^3.1.3","lodash":"^4.11.2","oauth":"^0.9.14","oniyi-object-transform":"^1.0.0","passport":"^0.3.2","passport-http-bearer":"^1.0.1","pkginfo":"^0.4.0","request":"^2.72.0","underscore":"^1.8.3","webfinger":"^0.4.2","valid-url":"^1.0.6","xml-crypto":"^0.8.4","xml2js":"^0.4.16","xmldom":"^0.1.22","xtend":"4.0.1"},"scripts":{"test":"grunt run_all_tests"},"engines":{"node":">= 4.0.1"},"gitHead":"9418f3689cffc113dc248c5e72d9dd049883300f","bugs":{"url":"https://github.com/AzureAD/passport-azure-ad/issues"},"homepage":"https://github.com/AzureAD/passport-azure-ad#readme","_id":"@deloittesolutions/passport-azure-ad@2.0.4","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"xavierdutreilh","email":"xavier@dutreilh.com"},"dist":{"integrity":"sha512-TlYr0EP1hg0ddfbq6QseudymaIK2R+LGkwadj/fI3o0GQnktsLch4nXTEXmQ9l9BKraL7g6RagJW+N3KRg1wdQ==","shasum":"996b6e71112af12fe352992a4ca5dd474fa6f30b","tarball":"https://registry.npmjs.org/@deloittesolutions/passport-azure-ad/-/passport-azure-ad-2.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIERsY0JpGLdHUj4i+5LYIhtTF+JCu/gahEh+08hdVdZlAiBYoZC/NMRTyFfHeVb0f4ysyZDMuQ9pkiM0Herh7O0eDw=="}]},"maintainers":[{"name":"xavierdutreilh","email":"xavier@dutreilh.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-azure-ad-2.0.4.tgz_1497281955327_0.5270247841253877"}},"2.0.5":{"name":"@deloittesolutions/passport-azure-ad","version":"2.0.5","license":"MIT","keywords":["saml","samlp","wsfed","azure active directory","aad","adfs","sso","oidc","bearer","shibboleth"],"description":"WSFED/SAMLP/OIDC/Bearer Passport strategies for Azure Active Directory","author":{"name":"azuread","email":"nugetaad@microsoft.com","url":"http://microsoft.com/"},"repository":{"type":"git","url":"git+ssh://git@github.com/AzureAD/passport-azure-ad.git"},"main":"./lib","devDependencies":{"body-parser":"^1.15.0","cookie-parser":"^1.4.0","eslint":"^2.9.0","eslint-config-oniyi":"^3.0.0","express-session":"^1.12.1","grunt":"^1.0.1","grunt-contrib-jshint":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-contrib-watch":"^1.0.0","grunt-mocha-test":"^0.12.7","grunt-eslint":"^18.1.0","nodeunit":"^0.9.1","mocha":"^3.0.2","chai":"2.x.x","chai-passport-strategy":"1.x.x"},"dependencies":{"async":"^1.5.2","base64url":"^2.0.0","bunyan":"^1.8.0","cache-manager":"^2.0.0","jsonwebtoken":"^6.2.0","jws":"^3.1.3","lodash":"^4.11.2","oauth":"^0.9.14","oniyi-object-transform":"^1.0.0","passport":"^0.3.2","passport-http-bearer":"^1.0.1","pkginfo":"^0.4.0","request":"^2.72.0","underscore":"^1.8.3","webfinger":"^0.4.2","valid-url":"^1.0.6","xml-crypto":"^0.8.4","xml2js":"^0.4.16","xmldom":"^0.1.22","xtend":"4.0.1"},"scripts":{"test":"grunt run_all_tests"},"engines":{"node":">= 4.0.1"},"gitHead":"a9c4aac8e6802aaef2f36be4f61e087253afd316","bugs":{"url":"https://github.com/AzureAD/passport-azure-ad/issues"},"homepage":"https://github.com/AzureAD/passport-azure-ad#readme","_id":"@deloittesolutions/passport-azure-ad@2.0.5","_npmVersion":"5.0.3","_nodeVersion":"8.1.0","_npmUser":{"name":"pauldeblicker","email":"paul.deblicker@gmail.com"},"dist":{"integrity":"sha512-yUpHj5ZyiY9vGgxTWaHCbFOxFUHBOfMaRIesLcZQ7uwi03EerrmHzI3VZI1H+uQrv0OM1oe9SWWCBdcJqbieWw==","shasum":"afd2144a328fe37fc2b7f21b780659836d540581","tarball":"https://registry.npmjs.org/@deloittesolutions/passport-azure-ad/-/passport-azure-ad-2.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC83p6xVYpkvPii82t3/jEtC2OggqK9j6pOmlOPhPO8+gIhAOKevqCDI8qIW9I1zTcICZTrQJHv43rmKEAFnHGLG6VL"}]},"maintainers":[{"email":"amaury.cannesson@gmail.com","name":"amaurycannesson"},{"email":"paul.deblicker@gmail.com","name":"pauldeblicker"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-azure-ad-2.0.5.tgz_1499870229457_0.6483876437414438"}}},"readme":"\n# Microsoft Azure Active Directory Passport.js Plug-In\n=============\n\n_passport-azure-ad_ is a collection of [Passport](http://passportjs.org/) Strategies \nto help you integrate with Azure Active Directory. It includes OpenID Connect, \nWS-Federation, and SAML-P authentication and authorization. These providers let you \nintegrate your Node app with Microsoft Azure AD so you can use its many features, \nincluding web single sign-on (WebSSO), Endpoint Protection with OAuth, and JWT token \nissuance and validation.\n\n_passport-azure-ad_ has been tested to work with both [Microsoft Azure Active Directory](https://azure.microsoft.com/en-us/services/active-directory/) \nand with [Microsoft Active Directory Federation Services](http://en.wikipedia.org/wiki/Active_Directory_Federation_Services).\n\n## Security Vulnerability in Versions < 1.4.6 and 2.0.0\n_passport-azure-ad_ has a known security vulnerability affecting versions <1.4.6 and 2.0.0. Please update to >=1.4.6 or >=2.0.1 immediately. For more details, see the [security notice](https://github.com/AzureAD/passport-azure-ad/blob/master/SECURITY-NOTICE.MD).\n\n## Versions\nCurrent version - 2.0.5  \nMinimum  recommended version - 1.4.6  \nYou can find the changes for each version in the [change log](https://github.com/AzureAD/passport-azure-ad/blob/master/CHANGELOG.md).\n\n## Contribution History\n\n[![Stories in Ready](https://badge.waffle.io/AzureAD/passport-azure-ad.png?label=ready&title=Ready)](https://waffle.io/AzureAD/passport-azure-ad)\n\n[![Throughput Graph](https://graphs.waffle.io/AzureAD/passport-azure-ad/throughput.svg)](https://waffle.io/AzureAD/passport-azure-ad/metrics)\n\n## Installation\n\n    $ npm install passport-azure-ad\n\n## Usage\n\n### Configure strategy\n\nThis sample uses the OAuth2Bearer Strategy:\n\n```javascript\n\n// We pass these options in to the ODICBearerStrategy.\n\nvar options = {\n    // The URL of the metadata document for your app. We will put the keys for token validation from the URL found in the jwks_uri tag of the in the metadata.\n    identityMetadata: config.creds.identityMetadata,\n    issuer: config.creds.issuer,\n    audience: config.creds.audience\n\n};\n\nvar bearerStrategy = new BearerStrategy(options,\n    function(token, done) {\n        log.info('verifying the user');\n        log.info(token, 'was the token retreived');\n        findById(token.sub, function(err, user) {\n            if (err) {\n                return done(err);\n            }\n            if (!user) {\n                // \"Auto-registration\"\n                log.info('User was added automatically as they were new. Their sub is: ', token.sub);\n                users.push(token);\n                owner = token.sub;\n                return done(null, token);\n            }\n            owner = token.sub;\n            return done(null, user, token);\n        });\n    }\n);\n```\nThis sample uses the OIDCStrategy:\n\n```javascript\npassport.use(new OIDCStrategy({\n    callbackURL: config.creds.returnURL,\n    realm: config.creds.realm,\n    clientID: config.creds.clientID,\n    clientSecret: config.creds.clientSecret,\n    oidcIssuer: config.creds.issuer,\n    identityMetadata: config.creds.identityMetadata,\n    skipUserProfile: config.creds.skipUserProfile,\n    responseType: config.creds.responseType,\n    responseMode: config.creds.responseMode\n  },\n  function(iss, sub, profile, accessToken, refreshToken, done) {\n    if (!profile.email) {\n      return done(new Error(\"No email found\"), null);\n    }\n    // asynchronous verification, for effect...\n    process.nextTick(function () {\n      findByEmail(profile.email, function(err, user) {\n        if (err) {\n          return done(err);\n        }\n        if (!user) {\n          // \"Auto-registration\"\n          users.push(profile);\n          return done(null, profile);\n        }\n        return done(null, user);\n      });\n    });\n  }\n));\n```\n\n### Provide the authentication callback for OIDCStrategy\n\nTo complete the sample, provide a route that corresponds to the path \nconfiguration parameter that is sent to the strategy:\n\n```javascript\n\napp.get('/login', \n  passport.authenticate('azuread-openidconnect', { failureRedirect: '/login' }),\n  function(req, res) {\n    log.info('Login was called in the Sample');\n    res.redirect('/');\n});\n\n// POST /auth/openid/return\n//   Use passport.authenticate() as route middleware to authenticate the\n//   request.  If authentication fails, the user will be redirected back to the\n//   login page.  Otherwise, the primary route function function will be called,\n//   which, in this example, will redirect the user to the home page.\napp.post('/auth/openid/return',\n  passport.authenticate('azuread-openidconnect', { failureRedirect: '/login' }),\n  function(req, res) {\n    \n    res.redirect('/');\n  });\n\n  app.get('/logout', function(req, res){\n  req.logout();\n  res.redirect('/');\n});\n\n```\n\n## Test\n\nIn the library root folder, type the following command to install the dependency packages:\n\n```\n    $ npm install\n```\n\nThen type the following command to run tests:\n\n```\n    $ npm test\n```\n\nTests will run automatically and in the terminal you can see how many tests are passing/failing. More details can be found [here](https://github.com/AzureAD/passport-azure-ad/blob/master/contributing.md).\n\n## Samples and Documentation\n\n[We provide a full suite of sample applications and documentation on GitHub](https://azure.microsoft.com/en-us/documentation/samples/?service=active-directory) \nto help you get started with learning the Azure Identity system. This includes \ntutorials for native clients such as Windows, Windows Phone, iOS, OSX, Android, \nand Linux. We also provide full walkthroughs for authentication flows such as \nOAuth2, OpenID Connect, Graph API, and other awesome features. \n\nAzure Identity samples for this plug-in is here: [https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect](https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect)\n\n\n## Community Help and Support\n\nWe leverage [Stack Overflow](http://stackoverflow.com/) to work with the community on supporting Azure Active Directory and its SDKs, including this one. We highly recommend you ask your questions on Stack Overflow (we're all on there!) Also browser existing issues to see if someone has had your question before. \n\nWe recommend you use the \"adal\" tag so we can see it! Here is the latest Q&A on Stack Overflow for ADAL: [http://stackoverflow.com/questions/tagged/adal](http://stackoverflow.com/questions/tagged/adal)\n\n## Security Reporting\n\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\n\n## Contributing\n\nAll code is licensed under the MIT license and we triage actively on GitHub. We enthusiastically welcome contributions and feedback. You can clone the repo and start contributing now. \n\nMore details [about contribution](https://github.com/AzureAD/passport-azure-ad/blob/master/contributing.md) \n\n## Versions\nPlease check the releases for updates.\n\n## Acknowledgements\n\nThe code is based on Henri Bergius's [passport-saml](https://github.com/bergie/passport-saml) library and Matias Woloski's [passport-wsfed-saml2](https://github.com/auth0/passport-wsfed-saml2) library as well as Kiyofumi Kondoh's [passport-openid-google](https://github.com/kkkon/passport-google-openidconnect).\n\n## License\nCopyright (c) Microsoft Corp.  All rights reserved. Licensed under the MIT License;\n\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","maintainers":[{"email":"benabdelaziz.s@sfeir.com","name":"samibenbdelaziz"},{"email":"amaury.cannesson@gmail.com","name":"amaurycannesson"},{"email":"paul.deblicker@gmail.com","name":"pauldeblicker"}],"time":{"modified":"2022-04-05T03:42:27.813Z","created":"2017-06-12T15:39:16.624Z","2.0.4":"2017-06-12T15:39:16.624Z","2.0.5":"2017-07-12T14:37:11.245Z"},"homepage":"https://github.com/AzureAD/passport-azure-ad#readme","keywords":["saml","samlp","wsfed","azure active directory","aad","adfs","sso","oidc","bearer","shibboleth"],"repository":{"type":"git","url":"git+ssh://git@github.com/AzureAD/passport-azure-ad.git"},"author":{"name":"azuread","email":"nugetaad@microsoft.com","url":"http://microsoft.com/"},"bugs":{"url":"https://github.com/AzureAD/passport-azure-ad/issues"},"license":"MIT","readmeFilename":"README.md"}