本文介绍了Active Directory身份验证上的Node.js的WebSocket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Web应用程序的Node.js并将其放置在Azure上。这个承载了Socket.io的WebSocket和网站,我想保护身份验证的一种形式背后。我最初的计划是使用ActiveDirectory中,但我无法找到连接使用的一种认证的WebSocket的任何信息。

I've created a Node.js WebApp and placed it on Azure. This hosts a Socket.io WebSocket and Website that I want to protect behind a form of authentication. My initial plan was to use ActiveDirectory, but I can't find any information on connecting a WebSocket using that kind of authentication.

有没有使用Active Directory或其他方式相似,易于安装身份验证来保护网站和WebSocket的?

Is there a way to use Active Directory or another similar and easy to setup authentication to protect both the website and the WebSocket?

我就准备用socket.io客户端连接到该服务器端Web应用程序从本地机器。

I am planning on connecting to this server-side web app from a local machine using a socket.io-client.

推荐答案

在简单经过再三考虑,我决定放弃传统的Azure提供的ActiveDirectory身份验证一起。 (它会阻止目前​​对WebSocket流量,这样我不能做在插座上手动验证)

After much consideration on simplicity, I decided to drop the traditional Azure provided ActiveDirectory Authentication all together. (It blocks WebSocket traffic so that I could not do any manual authentication over the sockets)

我,而不是处理网验证自己使用并取其验证我选择的,的,,的,。

I instead handle the website authentication myself using Passport and whichever authentication I choose Active Directory, Facebook, Google, Twitter, Github.

对于Socket.io认证,我用的保护与连接安全和认证的定制层。

For the Socket.io authentication, I used socketio-auth to protect the connections with a custom layer of security and authentication.

这篇关于Active Directory身份验证上的Node.js的WebSocket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 20:25