[英]How to use passport.js and OpenID Connect strategy with Azure AD
I looking to authenticate users using OpenID Connect, Node.js, Passport.js against Azure AD. 我希望使用OpenID Connect,Node.js,Passport.js对Azure AD进行身份验证。 Could you please point me to any resources/docs and/or sample code?
能否请您指出任何资源/文档和/或示例代码?
I came across passport-openidconnect . 我遇到了护照 - openidconnect 。 Is this still the active module?
这还是活动模块吗? are you aware of any other module that I could use for this?
你知道我可以使用的任何其他模块吗? If so if you could point me to some sample code that would be great!
如果是这样,如果你能指出一些很棒的示例代码!
There is a passport module specifically for Azure AD called passport-azure-ad Azure AD专用的护照模块名为passport-azure-ad
The steps to do set this up are: 设置此步骤的步骤如下:
Setup your app to use the passport-azure-ad. 设置您的应用以使用passport-azure-ad。
3.a Setup the passport strategy 3.a设置护照策略
3.b Add methods to keep track of logged in users 3.b添加跟踪登录用户的方法
3.c Initialize passport while loading the express engine 3.c在加载快车时初始化护照
3.d Add the routes that will handle login/logoff 3.d添加将处理登录/注销的路由
Check out the official docs (which include a sample) for code for each of these steps: https://azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-openidconnect-nodejs/ 查看官方文档(包括示例)以获取每个步骤的代码: https : //azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-openidconnect-nodejs/
The answer to your question is positive. 你的问题的答案是积极的。 There are several node.js modules you can use to implement authentication via AAD.
您可以使用几个node.js模块通过AAD实现身份验证。
passport-azure-ad
, please refer to https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect for the sample which implement the requirement leveraging express
and passport-azure-ad
. passport-azure-ad
,请参阅https://github.com/Azure-Samples/active-directory-node-webapp-openidconnect以获取实施express
和passport-azure-ad
要求的样本passport-azure-ad
。 Any further concern, please feel free to let me know. 如有任何疑问,请随时告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.