且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用kerberos身份验证实现单点登录?

更新时间:2023-12-03 10:24:46

在已注册到ActiveDirectory域的Windows服务器上的IIS中部署应用程序时,几乎

When deploying your application in IIS on a Windows server registered into an ActiveDirectory domain, almost all the job is already done by default.

在标准情况下:IE浏览器也在域中注册的Windows工作站上运行,并且用户也在域中登录,默认情况下会进行HTTP SPNEGO协商(IE选项为 Windows集成身份验证).

In a standard context: IE browsers running on a Windows workstation registered in the domain with the user logged in the domain too, HTTP SPNEGO negotiation happens by default (IE option is Windows integrated authentication).

然后,您在ASP.NET中的代码只需从User.Identity.Name获取用户名

Then your code in ASP.NET just have to get username from User.Identity.Name