Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
出于自定义授权的目的,我需要找出当前用户是谁,以便确定他们是否获得授权。
我可以使用[Authorize]属性来强制 Windows 身份验证吗?
然后我可以使用Thread.CurrentPrincipal来确定用户是谁吗?