Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AuthenticationType

override? string System.Security.Principal.WindowsIdentity.AuthenticationType
getsealed

Implements System.Security.Principal.IIdentity.

Definition at line 59 of file WindowsIdentity.cs.

60 {
61 get
62 {
64 {
65 return string.Empty;
66 }
67 if (_authType == null)
68 {
69 global::Interop.LUID LogonId = GetLogonAuthId(_safeTokenHandle);
70 if (LogonId.LowPart == 998)
71 {
72 return string.Empty;
73 }
75 try
76 {
77 int num = global::Interop.SspiCli.LsaGetLogonSessionData(ref LogonId, out ppLogonSessionData);
78 if (num < 0)
79 {
80 throw GetExceptionFromNtStatus(num);
81 }
82 ppLogonSessionData.Initialize((uint)Marshal.SizeOf<global::Interop.SECURITY_LOGON_SESSION_DATA>());
83 return Marshal.PtrToStringUni(ppLogonSessionData.Read<global::Interop.SECURITY_LOGON_SESSION_DATA>(0uL).AuthenticationPackage.Buffer);
84 }
85 finally
86 {
87 ppLogonSessionData?.Dispose();
88 }
89 }
90 return _authType;
91 }
92 }
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:652
static int SizeOf(object structure)
Definition Marshal.cs:697
static Exception GetExceptionFromNtStatus(int status)
static global::Interop.LUID GetLogonAuthId(SafeAccessTokenHandle safeTokenHandle)