表单的身份验证SignalR [英] Forms authentication with SignalR

查看:130
本文介绍了表单的身份验证SignalR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过SignalR维基后仍然无法弄清楚如何做Forms身份验证与SignalR。我想调用与用户名/密码到集线器的电话(或持久连接),并能够重定向返回到身份验证页面,可在设置窗体身份验证cookie一起。

I have gone through wiki on SignalR and still can't figure out how to do Forms authentication with SignalR. I'd like to invoke a call to a hub (or persistent connection) with username/password and be able to return a redirect to an authenticated page, along with setting forms authentication cookie.

推荐答案

不要通过SignalR做窗体身份验证。做SignalR之外(因为你通常会),然后就可以进行检查以确保来电,和用户到你的集线器进行身份验证。

Don't do forms auth through SignalR. Do it outside of SignalR (as you would normally) and then you can check to make sure incoming calls, and subscribers to your hub are authenticated.

这篇关于表单的身份验证SignalR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆