开发者

How to get Authentication Type (like WindowsIdentity.AuthenticationType property)

开发者 https://www.devze.com 2023-03-20 14:02 出处:网络
In C#, the following code would give authentication type of current user: System.Security.开发者_运维技巧Principal.WindowsIdentity.GetCurrent().AuthenticationType;

In C#, the following code would give authentication type of current user:

System.Security.开发者_运维技巧Principal.WindowsIdentity.GetCurrent().AuthenticationType;

The returned value would be either NTLM or Kerberos.

How do I get same information using Windows API. I tried locating information through GetTokenInformation, but none of information classes serve the information. I couldn't find any functions in LSA or Authorization also.


You use LsaGetLogonSessionData(). The returned SECURITY_LOGON_SESSION_DATA.AuthenticationPackage contains the authentication package name. Get the LUID you need from GetTokenInformation

0

精彩评论

暂无评论...
验证码 换一张
取 消