using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security.Permissions;
+using System.Security.Claims;
+using Microsoft.Win32.SafeHandles;
namespace System.Security.Principal {
_info = info;
}
+ internal WindowsIdentity (ClaimsIdentity claimsIdentity, IntPtr userToken)
+ : base (claimsIdentity)
+ {
+ if (userToken != IntPtr.Zero && userToken.ToInt64() > 0)
+ {
+ SetToken (userToken);
+ }
+ }
+
[ComVisible (false)]
public void Dispose ()
{
return new WindowsImpersonationContext (userToken);
}
+ [SecuritySafeCritical]
+ public static void RunImpersonated (SafeAccessTokenHandle safeAccessTokenHandle, Action action)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [SecuritySafeCritical]
+ public static T RunImpersonated<T> (SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func)
+ {
+ throw new NotImplementedException ();
+ }
+
// properties
sealed override
public string AuthenticationType {
info.AddValue ("m_isAuthenticated", _authenticated);
}
+ internal ClaimsIdentity CloneAsBase ()
+ {
+ return base.Clone();
+ }
+
+ internal IntPtr GetTokenInternal ()
+ {
+ return _token;
+ }
+
private void SetToken (IntPtr token)
{
if (Environment.IsUnix) {
}
}
+ public SafeAccessTokenHandle AccessToken {
+ get { throw new NotImplementedException (); }
+ }
+
// see mono/mono/metadata/security.c for implementation
// Many people use reflection to get a user's roles - so many