声明是如何插入到 HttpContext.Current.User 中的?

How is the claim inserted into HttpContext.Current.User?

当我调试我的 ASP.NET MVC 应用程序时,我发现 HttpContext.Current.User 中有很多信息。如下图所示。(我不能直接在我的问题中粘贴图片,我只能提供link。也许有人可以帮助编辑我的问题?)

The fist picture

The second picture

何时以及如何将声明插入到用户对象中?我可以理解 vcn\v0cn430 是我的域名,IIS 可以获取它并将其插入到管道事件的某个步​​骤中的用户对象中。

但是管理员是什么?是 windows 广告组吗?我认为我的域没有这样的组。为什么?非常感谢。

如果您使用 Windows 身份验证,这是当前登录的用户。

这些值是从您的 Active Directory 中读取的。

另外,您可以使用:

User.Identity.Name;

Windows authentication in MVC

您的应用程序本身可以发出声明,使用 'Admin' 等应用程序级别的名称作为安全令牌。 https://msdn.microsoft.com/en-us/library/ff359101.aspx