43 instantiations of WindowsIdentity
mscorlib (10)
system\security\claims\ClaimsPrincipal.cs (1)
412claimsIdentity = new WindowsIdentity(claimsIdentity, new IntPtr(handle));
system\security\principal\windowsidentity.cs (6)
288return new WindowsIdentity(); 623wi = new WindowsIdentity(safeAccessTokenHandle); 643wi = new WindowsIdentity(safeAccessTokenHandle); 675WindowsIdentity wi = new WindowsIdentity(userToken, null, -1); 812WindowsIdentity wi = new WindowsIdentity(); 1212return new WindowsIdentity(this);
system\security\securitycontext.cs (3)
518sc._windowsIdentity = new WindowsIdentity(WindowsIdentity.AccessToken); 538sc._windowsIdentity = new WindowsIdentity(this.WindowsIdentity.AccessToken); 591sc._windowsIdentity = new WindowsIdentity(currentIdentity.AccessToken);
System (2)
net\System\Net\HttpListener.cs (1)
1323return new WindowsIdentity(userToken, type, acctType, isAuthenticated);
net\System\Net\SecureProtocols\_NegoState.cs (1)
337result = new WindowsIdentity(token.DangerousGetHandle(), authtype, WindowsAccountType.Normal, true);
System.IdentityModel (17)
System\IdentityModel\Claims\ClaimsHelper.cs (1)
41return new WindowsIdentity(upn);
System\IdentityModel\SecurityUtils.cs (2)
697return new WindowsIdentity(token, authenticationType); 701return new WindowsIdentity(token);
System\IdentityModel\Selectors\WindowsUserNameSecurityTokenAuthenticator.cs (1)
58WindowsIdentity windowsIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle(), SecurityUtils.AuthTypeBasic);
System\IdentityModel\Selectors\X509SecurityTokenAuthenticator.cs (3)
109using (WindowsIdentity initialWindowsIdentity = new WindowsIdentity(name, SecurityUtils.AuthTypeCertMap)) 112windowsIdentity = new WindowsIdentity(initialWindowsIdentity.Token, SecurityUtils.AuthTypeCertMap); 277return new WindowsIdentity(tokenHandle.DangerousGetHandle(), SecurityUtils.AuthTypeCertMap);
System\IdentityModel\Tokens\KerberosReceiverSecurityToken.cs (1)
268WindowsIdentity windowsIdentity = new WindowsIdentity( tokenHandle.DangerousGetHandle(), SecurityUtils.AuthTypeKerberos);
System\IdentityModel\Tokens\KerberosSecurityTokenHandler.cs (1)
95WindowsIdentity wi = new WindowsIdentity(kerbToken.WindowsIdentity.Token, kerbToken.WindowsIdentity.AuthenticationType);
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (2)
421WindowsIdentity wi = new WindowsIdentity(upn); 423return new WindowsIdentity(wi.Token, AuthenticationTypes.Federation, WindowsAccountType.Normal, true);
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (2)
1068WindowsIdentity wi = new WindowsIdentity(upn); 1070return new WindowsIdentity(wi.Token, AuthenticationTypes.Federation, WindowsAccountType.Normal, true);
System\IdentityModel\Tokens\SessionSecurityToken.cs (2)
940WindowsIdentity winId = new WindowsIdentity(GetUpn(logonName)); 941identity = new WindowsIdentity(winId.Token, authenticationType);
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (1)
101WindowsIdentity windowsIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle(), AuthenticationTypes.Password, WindowsAccountType.Normal, true);
System\IdentityModel\Tokens\X509SecurityTokenHandler.cs (1)
556windowsIdentity = new WindowsIdentity(x509WindowsSecurityToken.WindowsIdentity.Token, x509WindowsSecurityToken.AuthenticationType);
System.ServiceModel (9)
System\ServiceModel\ComIntegration\ComPlusAuthorization.cs (2)
143anonymousIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle()); 187processIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle());
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (1)
239using (WindowsIdentity windowsIdentity = new WindowsIdentity(fullyQualifiedDomainName, SecurityUtils.AuthTypeKerberos))
System\ServiceModel\Security\IdentityModelServiceAuthorizationManager.cs (2)
235WindowsIdentity claimsIdentity = new WindowsIdentity( windowsSecurityToken.WindowsIdentity.Token, 524claimsIdentity = MergeClaims(claimsIdentity, new WindowsIdentity(windowsClaimSet.WindowsIdentity.Token,
System\ServiceModel\Security\SecurityUtils.cs (2)
506return new WindowsIdentity(token, authType); 508return new WindowsIdentity(token);
System\ServiceModel\Security\SpnegoTokenAuthenticator.cs (1)
136WindowsIdentity windowsIdentity = new WindowsIdentity(contextToken.DangerousGetHandle(), windowsNegotiation.ProtocolName);
System\ServiceModel\Security\TlsSspiNegotiation.cs (1)
688mappedIdentity = new WindowsIdentity(token.DangerousGetHandle(), SecurityUtils.AuthTypeCertMap);
System.Web (5)
Configuration\RemoteWebConfigurationHost.cs (1)
74_Identity = (tokenHandle == IntPtr.Zero) ? null : new WindowsIdentity(tokenHandle); //CreateWindowsIdentity(username, domain, password, tokenHandle);
Hosting\IIS7WorkerRequest.cs (1)
2295identity = new WindowsIdentity(pToken, authType, WindowsAccountType.Normal, true);
Management\WebEvents.cs (1)
1961_iprincipal = new WindowsPrincipal(new WindowsIdentity(winIdentity.Token, winIdentity.AuthenticationType));
Security\WindowsAuthenticationModule.cs (1)
156identity = new WindowsIdentity(
WorkerRequest.cs (1)
611return new WindowsIdentity(token, authType, accountType, isAuthenticated);
317 references to WindowsIdentity
ComSvcConfig (1)
Tool.cs (1)
640WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
mscorlib (47)
system\appdomain.cs (1)
3315principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
system\runtime\serialization\objectmanager.cs (2)
113TypeOfWindowsIdentity = (RuntimeType)typeof(WindowsIdentity); 874constInfo = WindowsIdentity.GetSpecialSerializationCtor();
system\security\claims\ClaimsIdentity.cs (3)
258if (identity is WindowsIdentity) 339if ((claimsIdentity is WindowsIdentity) && (!(this is WindowsIdentity)))
system\security\claims\ClaimsPrincipal.cs (4)
100if (identity is WindowsIdentity) 445if (identity.GetType() == typeof(WindowsIdentity)) 447WindowsIdentity windowsIdentity = identity as WindowsIdentity;
system\security\principal\windowsidentity.cs (16)
112s_specialSerializationCtor = typeof(WindowsIdentity).GetConstructor( 265public static WindowsIdentity GetCurrent () { 271public static WindowsIdentity GetCurrent (bool ifImpersonating) { 277public static WindowsIdentity GetCurrent (TokenAccessLevels desiredAccess) { 287public static WindowsIdentity GetAnonymous () { 621WindowsIdentity wi = null; 641WindowsIdentity wi = null; 675WindowsIdentity wi = new WindowsIdentity(userToken, null, -1); 726internal static WindowsImpersonationContext SafeImpersonate (SafeAccessTokenHandle userToken, WindowsIdentity wi, ref StackCrawlMark stackMark) 769internal static WindowsIdentity GetCurrentThreadWI() 775internal static void UpdateThreadWI(WindowsIdentity wi) 801internal static WindowsIdentity GetCurrentInternal (TokenAccessLevels desiredAccess, bool threadOnly) { 812WindowsIdentity wi = new WindowsIdentity(); 1153protected WindowsIdentity (WindowsIdentity identity) 1208/// Returns a new instance of <see cref="WindowsIdentity"/> with values copied from this object. 1242/// Gets the claims as <see cref="IEnumerable{Claim}"/>, associated with this <see cref="WindowsIdentity"/>.
system\security\principal\windowsimpersonationcontext.cs (3)
33private WindowsIdentity m_wi; 42internal WindowsImpersonationContext (SafeAccessTokenHandle safeTokenHandle, WindowsIdentity wi, bool isImpersonating, FrameSecurityDescriptor fsd) { 79WindowsIdentity.UpdateThreadWI(m_wi);
system\security\principal\windowsprincipal.cs (6)
53private WindowsIdentity m_identity = null; 68public WindowsPrincipal (WindowsIdentity ntIdentity) 173WindowsIdentity wi = identity as WindowsIdentity; 195WindowsIdentity wi = identity as WindowsIdentity;
system\security\securitycontext.cs (11)
174private volatile WindowsIdentity _windowsIdentity; 207public WindowsIdentity WindowsIdentity 239internal WindowsIdentity WindowsIdentity 371WindowsIdentity.SafeRevertToSelf(ref stackMark); 488scsw.wic = WindowsIdentity.SafeRevertToSelf(ref stackMark); 589WindowsIdentity currentIdentity = GetCurrentWI(currThreadEC); 631static internal WindowsIdentity GetCurrentWI(ExecutionContext.Reader threadEC) 640static internal WindowsIdentity GetCurrentWI(ExecutionContext.Reader threadEC, bool cachedAlwaysFlowImpersonationPolicy) 646return WindowsIdentity.GetCurrentInternal(TokenAccessLevels.MaximumAllowed, true); 655static internal void RestoreCurrentWI(ExecutionContext.Reader currentEC, ExecutionContext.Reader prevEC, WindowsIdentity targetWI, bool cachedAlwaysFlowImpersonationPolicy) 675static private void RestoreCurrentWIInternal(WindowsIdentity targetWI)
system\threading\executioncontext.cs (1)
295internal WindowsIdentity wi;
System (26)
compmod\system\codedom\compiler\Executor.cs (1)
338return WindowsIdentity.Impersonate(new IntPtr(0));
compmod\system\codedom\compiler\TempFiles.cs (2)
40private WindowsIdentity currentIdentity = null; 74currentIdentity = WindowsIdentity.GetCurrent();
net\System\Net\_AutoWebProxyScriptEngine.cs (2)
47private WindowsIdentity m_Identity; 67m_Identity = WindowsIdentity.GetCurrent();
net\System\Net\_ContextAwareResult.cs (3)
94private WindowsIdentity _Wi; 135_Wi = WindowsIdentity.GetCurrent(); 185internal WindowsIdentity Identity
net\System\Net\_NTAuthentication.cs (2)
392WindowsIdentity w = context == null ? null : context.Identity; 443using (WindowsIdentity.Impersonate(IntPtr.Zero))
net\System\Net\_SecureChannel.cs (2)
398using (WindowsIdentity.Impersonate(IntPtr.Zero)) 881using (WindowsIdentity.Impersonate(IntPtr.Zero))
net\System\Net\_SSPIWrapper.cs (2)
101currentIdentityKey = string.Format("{0}_{1}_{2}", package, intent.ToString(), WindowsIdentity.GetCurrent().Name); 115currentIdentityKey = string.Format("{0}_{1}_{2}", package, intent.ToString(), WindowsIdentity.GetCurrent().Name);
net\System\Net\Configuration\DefaultProxySection.cs (2)
171using(WindowsIdentity.Impersonate(IntPtr.Zero)) 217using(WindowsIdentity.Impersonate(IntPtr.Zero))
net\System\Net\HttpListener.cs (1)
1321internal static WindowsIdentity CreateWindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated)
net\System\Net\mail\smtpconnection.cs (1)
487WindowsIdentity w = context == null ? null : context.Identity;
net\System\Net\WebRequest.cs (4)
872WindowsIdentity currentUser = SafeCaptureIdenity(); 909WindowsIdentity currentUser = SafeCaptureIdenity(); 937private WindowsIdentity SafeCaptureIdenity() 939return WindowsIdentity.GetCurrent();
net\System\Net\WebSockets\HttpListenerWebSocketContext.cs (2)
149WindowsIdentity windowsIdentity = (WindowsIdentity)user.Identity;
sys\System\EnvironmentHelpers.cs (2)
40using (WindowsIdentity wi = WindowsIdentity.GetCurrent(TokenAccessLevels.Query)) {
System.Configuration (1)
System\Configuration\ClientConfigurationHost.cs (1)
494return WindowsIdentity.Impersonate(IntPtr.Zero);
System.Data (11)
fx\src\data\Microsoft\SqlServer\Server\SmiContext.cs (1)
32internal abstract WindowsIdentity WindowsIdentity { get; }
fx\src\data\Microsoft\SqlServer\Server\sqlcontext.cs (2)
60public static WindowsIdentity WindowsIdentity{ 122private WindowsIdentity InstanceWindowsIdentity {
fx\src\data\System\Data\ProviderBase\DbConnectionPoolIdentity.cs (4)
81static internal WindowsIdentity GetCurrentWindowsIdentity() { 82return WindowsIdentity.GetCurrent(); 86static private IntPtr GetWindowsIdentityToken(WindowsIdentity identity) { 103WindowsIdentity identity = GetCurrentWindowsIdentity();
fx\src\data\System\Data\SqlClient\SqlConnection.cs (3)
293internal WindowsIdentity _lastIdentity; 294internal WindowsIdentity _impersonateIdentity; 1529using (WindowsIdentity identity = DbConnectionPoolIdentity.GetCurrentWindowsIdentity()) {
fx\src\data\System\Data\SqlClient\SqlDependencyListener.cs (1)
50private WindowsIdentity _windowsIdentity;
System.IdentityModel (70)
System\IdentityModel\Claims\ClaimsHelper.cs (4)
20/// Creates a <see cref="WindowsIdentity"/> associated with a given X509 certificate. 22/// <param name="x509Certificate">The certificate to use to map to the associated <see cref="WindowsIdentity"/></param> 24public static WindowsIdentity CertificateLogon(X509Certificate2 x509Certificate) 47/// of mapping the identity to a <see cref="WindowsIdentity" /> object.
System\IdentityModel\Claims\WindowsClaimSet.cs (11)
20WindowsIdentity windowsIdentity; 28public WindowsClaimSet(WindowsIdentity windowsIdentity) 33public WindowsClaimSet(WindowsIdentity windowsIdentity, bool includeWindowsGroups) 38public WindowsClaimSet(WindowsIdentity windowsIdentity, DateTime expirationTime) 43public WindowsClaimSet(WindowsIdentity windowsIdentity, bool includeWindowsGroups, DateTime expirationTime) 48public WindowsClaimSet(WindowsIdentity windowsIdentity, string authenticationType, bool includeWindowsGroups, DateTime expirationTime) 53internal WindowsClaimSet(WindowsIdentity windowsIdentity, string authenticationType, bool includeWindowsGroups, bool clone) 58internal WindowsClaimSet(WindowsIdentity windowsIdentity, string authenticationType, bool includeWindowsGroups, DateTime expirationTime, bool clone) 103public WindowsIdentity WindowsIdentity 274public GroupSidClaimCollection(WindowsIdentity windowsIdentity) 351static bool TryCreateWindowsSidClaim(WindowsIdentity windowsIdentity, out Claim claim)
System\IdentityModel\Policy\UnconditionalPolicy.cs (1)
194SecurityUtils.DisposeIfNecessary(this.primaryIdentity as WindowsIdentity);
System\IdentityModel\SecurityUtils.cs (8)
634WindowsIdentity wid = identity as WindowsIdentity; 654internal static WindowsIdentity CloneWindowsIdentityIfNecessary(WindowsIdentity wid) 660internal static WindowsIdentity CloneWindowsIdentityIfNecessary(WindowsIdentity wid, string authenticationType) 680static IntPtr UnsafeGetWindowsIdentityToken(WindowsIdentity wid) 693static WindowsIdentity UnsafeCreateWindowsIdentityFromToken(IntPtr token, string authenticationType)
System\IdentityModel\Selectors\WindowsUserNameSecurityTokenAuthenticator.cs (1)
58WindowsIdentity windowsIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle(), SecurityUtils.AuthTypeBasic);
System\IdentityModel\Selectors\X509SecurityTokenAuthenticator.cs (3)
93WindowsIdentity windowsIdentity = null; 109using (WindowsIdentity initialWindowsIdentity = new WindowsIdentity(name, SecurityUtils.AuthTypeCertMap)) 134internal static WindowsIdentity KerberosCertificateLogon(X509Certificate2 certificate)
System\IdentityModel\Tokens\AuthorizationPolicy.cs (5)
227WindowsIdentity wci = identity as WindowsIdentity; 233WindowsIdentity wi = identity as WindowsIdentity; 270if (identity is WindowsIdentity)
System\IdentityModel\Tokens\KerberosReceiverSecurityToken.cs (2)
118public override WindowsIdentity WindowsIdentity 268WindowsIdentity windowsIdentity = new WindowsIdentity( tokenHandle.DangerousGetHandle(), SecurityUtils.AuthTypeKerberos);
System\IdentityModel\Tokens\KerberosSecurityTokenHandler.cs (2)
68/// <exception cref="InvalidOperationException">The <see cref="WindowsIdentity"/> of the <see cref="KerberosReceiverSecurityToken"/>is null.</exception> 95WindowsIdentity wi = new WindowsIdentity(kerbToken.WindowsIdentity.Token, kerbToken.WindowsIdentity.AuthenticationType);
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (5)
409/// Creates a <see cref="WindowsIdentity"/> object using the <paramref name="upn"/> value. 412/// <returns>A <see cref="WindowsIdentity"/> object.</returns> 414protected virtual WindowsIdentity CreateWindowsIdentity(string upn) 421WindowsIdentity wi = new WindowsIdentity(upn); 1607/// of mapping the identity to a <see cref="WindowsIdentity" /> object.
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (6)
1025WindowsIdentity windowsIdentity = CreateWindowsIdentity(FindUpn(claimsIdentity)); 1056/// Creates a <see cref="WindowsIdentity"/> object using the <paramref name="upn"/> value. 1059/// <returns>A <see cref="WindowsIdentity"/> object.</returns> 1061protected virtual WindowsIdentity CreateWindowsIdentity(string upn) 1068WindowsIdentity wi = new WindowsIdentity(upn); 1075/// of mapping the identity to a <see cref="WindowsIdentity" /> object.
System\IdentityModel\Tokens\SessionSecurityToken.cs (5)
819WindowsIdentity wi = null; 822wi = identity as WindowsIdentity; 940WindowsIdentity winId = new WindowsIdentity(GetUpn(logonName)); 1288WindowsIdentity wci = identity as WindowsIdentity;
System\IdentityModel\Tokens\WindowsSecurityToken.cs (7)
20WindowsIdentity windowsIdentity; 23public WindowsSecurityToken(WindowsIdentity windowsIdentity) 28public WindowsSecurityToken(WindowsIdentity windowsIdentity, string id) 33public WindowsSecurityToken(WindowsIdentity windowsIdentity, string id, string authenticationType) 43protected void Initialize(string id, DateTime effectiveTime, DateTime expirationTime, WindowsIdentity windowsIdentity, bool clone) 48protected void Initialize(string id, string authenticationType, DateTime effectiveTime, DateTime expirationTime, WindowsIdentity windowsIdentity, bool clone) 84public virtual WindowsIdentity WindowsIdentity
System\IdentityModel\Tokens\WindowsUserNameSecurityTokenHandler.cs (1)
101WindowsIdentity windowsIdentity = new WindowsIdentity(tokenHandle.DangerousGetHandle(), AuthenticationTypes.Password, WindowsAccountType.Normal, true);
System\IdentityModel\Tokens\X509SecurityTokenHandler.cs (2)
549WindowsIdentity windowsIdentity; 673internal static WindowsIdentity KerberosCertificateLogon(X509Certificate2 certificate)
System\IdentityModel\Tokens\X509WindowsSecurityToken.cs (7)
12WindowsIdentity windowsIdentity; 16public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity) 21public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string id) 26public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, string id) 31internal X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, bool clone) 36internal X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, string id, bool clone) 47public WindowsIdentity WindowsIdentity
System.IdentityModel.Selectors (1)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (1)
513SecurityIdentifier sid = WindowsIdentity.GetCurrent().User;
System.Management (1)
Instrumentation\WMICapabilities.cs (1)
143WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
System.Runtime.Remoting (12)
channels\core\corechannel.cs (1)
914return WindowsIdentity.GetCurrent().User.ToString();
channels\core\socketmanager.cs (2)
46private WindowsIdentity _impersonationIdentity; // Identity to impersonate 216public WindowsIdentity ImpersonationIdentity
channels\ipc\ipcport.cs (1)
60dacl.AddAccess(AccessControlType.Allow, WindowsIdentity.GetCurrent().User, -1, InheritanceFlags.None, PropagationFlags.None);
channels\ipc\ipcserverchannel.cs (2)
395WindowsIdentity identity = null; 409identity = WindowsIdentity.GetCurrent();
channels\ipc\portcache.cs (2)
100WindowsIdentity currentId = WindowsIdentity.GetCurrent(true/*ifImpersonating*/);
channels\tcp\tcpserverchannel.cs (4)
424WindowsIdentity identity = null; 492private WindowsIdentity Authenticate(ref Stream netStream, TcpServerSocketHandler streamManager) 505return (WindowsIdentity)negoServer.RemoteIdentity; 560WindowsIdentity identity = streamManager.ImpersonationIdentity;
System.ServiceModel (75)
System\ServiceModel\Channels\FramingChannels.cs (5)
433WindowsIdentity identityToImpersonate; 452this.identityToImpersonate = WindowsIdentity.GetCurrent(true); 991StreamUpgradeInitiator upgradeInitiator, string contentType, WindowsIdentity identityToImpersonate, TimeoutHelper timeoutHelper, 1206WindowsIdentity identityToImpersonate; 1211string contentType, WindowsIdentity identityToImpersonate, TimeoutHelper timeoutHelper,
System\ServiceModel\Channels\HttpChannelListener.cs (4)
554WindowsIdentity wid = null; 558wid = listenerContext.User.Identity as WindowsIdentity; 650SecurityMessageProperty ProcessAuthentication(WindowsIdentity identity, string authenticationType) 814WindowsIdentity LogonUserIdentity { get; }
System\ServiceModel\Channels\HttpsChannelListener.cs (3)
142SecurityMessageProperty CreateSecurityProperty(X509Certificate2 certificate, WindowsIdentity identity, string authType) 181WindowsIdentity identity = null; 189identity = WindowsIdentity.GetAnonymous();
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (2)
246WindowsIdentity remoteIdentity = (WindowsIdentity)negotiateStream.RemoteIdentity;
System\ServiceModel\ComIntegration\ComPlusAuthorization.cs (9)
22static WindowsIdentity anonymousIdentity; 23static WindowsIdentity processIdentity; 92public static WindowsIdentity GetAnonymousIdentity() 171public static WindowsIdentity GetProcessIdentity() 292private void CheckAccess(WindowsIdentity clientIdentity, out bool IsAccessAllowed) 368public bool IsAuthorizedForOperation(WindowsIdentity clientIdentity) 406WindowsIdentity clientIdentity = null; 427public ComPlusServerSecurity(WindowsIdentity clientIdentity, bool shouldUseCallContext) 542impersonateContext = WindowsIdentity.Impersonate(clientIdentity.Token);
System\ServiceModel\ComIntegration\ComPlusDiagnosticTraceRecords.cs (2)
139WindowsIdentity callerIdentity = MessageUtil.GetMessageIdentity(message); 153WindowsIdentity callerIdentity = MessageUtil.GetMessageIdentity(message);
System\ServiceModel\ComIntegration\ComPlusInstanceProvider.cs (1)
50WindowsIdentity callerIdentity = null;
System\ServiceModel\ComIntegration\ComPlusThreadInitializer.cs (1)
83WindowsIdentity identity = null;
System\ServiceModel\ComIntegration\MessageUtil.cs (2)
21public static WindowsIdentity GetMessageIdentity(Message message) 23WindowsIdentity callerIdentity = null;
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (4)
79anonymousWindowsPrincipal = new WindowsPrincipal(WindowsIdentity.GetAnonymous()); 224WindowsIdentity impersonationToken = securityContext.WindowsIdentity; 239using (WindowsIdentity windowsIdentity = new WindowsIdentity(fullyQualifiedDomainName, SecurityUtils.AuthTypeKerberos)) 340WindowsIdentity wid = securityContext.WindowsIdentity;
System\ServiceModel\Security\IdentityModelServiceAuthorizationManager.cs (4)
235WindowsIdentity claimsIdentity = new WindowsIdentity( windowsSecurityToken.WindowsIdentity.Token, 618WindowsIdentity windowsIdentity = identity1 as WindowsIdentity; 625windowsIdentity = identity2 as WindowsIdentity;
System\ServiceModel\Security\IdentityVerifier.cs (2)
230if (claim.Resource is WindowsIdentity) 231return ((WindowsIdentity)claim.Resource).User;
System\ServiceModel\Security\SctClaimSerializer.cs (5)
425if (identity is WindowsIdentity) 427WindowsIdentity wid = (WindowsIdentity)identity; 433using (WindowsIdentity self = WindowsIdentity.GetCurrent())
System\ServiceModel\Security\SecurityUtils.cs (17)
423static bool IsSystemAccount(WindowsIdentity self) 440using (WindowsIdentity self = WindowsIdentity.GetCurrent()) 460internal static WindowsIdentity CloneWindowsIdentityIfNecessary(WindowsIdentity wid) 468internal static WindowsIdentity CloneWindowsIdentityIfNecessary(WindowsIdentity wid, string authType) 484static IntPtr UnsafeGetWindowsIdentityToken(WindowsIdentity wid) 494using (WindowsIdentity self = WindowsIdentity.GetCurrent()) 503static WindowsIdentity UnsafeCreateWindowsIdentityFromToken(IntPtr token, string authType) 511internal static bool AllowsImpersonation(WindowsIdentity windowsIdentity, TokenImpersonationLevel impersonationLevel) 829using (WindowsIdentity wid = WindowsIdentity.GetCurrent()) 1099WindowsIdentity windows = identity as WindowsIdentity; 2295public static void ValidateAnonymityConstraint(WindowsIdentity identity, bool allowUnauthenticatedCallers)
System\ServiceModel\Security\SpnegoTokenAuthenticator.cs (1)
136WindowsIdentity windowsIdentity = new WindowsIdentity(contextToken.DangerousGetHandle(), windowsNegotiation.ProtocolName);
System\ServiceModel\Security\TlsnegoTokenAuthenticator.cs (1)
233WindowsIdentity preMappedIdentity;
System\ServiceModel\Security\TlsSspiNegotiation.cs (1)
672internal bool TryGetContextIdentity(out WindowsIdentity mappedIdentity)
System\ServiceModel\Security\WindowsSspiNegotiation.cs (1)
241using (WindowsIdentity windowsIdentity = new WindowsIdentity(contextToken.DangerousGetHandle(), this.ProtocolName))
System\ServiceModel\ServiceSecurityContext.cs (7)
25WindowsIdentity windowsIdentity; 133public WindowsIdentity WindowsIdentity 139WindowsIdentity windowsIdentity = null; 145WindowsIdentity identity = identities[i] as WindowsIdentity; 151windowsIdentity = WindowsIdentity.GetAnonymous(); 159this.windowsIdentity = windowsIdentity ?? WindowsIdentity.GetAnonymous();
System\ServiceModel\UpnEndpointIdentity.cs (3)
23WindowsIdentity windowsIdentity; 49internal UpnEndpointIdentity(WindowsIdentity windowsIdentity) 75string GetUpnFromWindowsIdentity(WindowsIdentity windowsIdentity)
System.ServiceModel.Activation (7)
System\ServiceModel\Activation\HostedHttpRequestAsyncResult.cs (7)
33static WindowsIdentity anonymousIdentity; 194public static WindowsIdentity AnonymousIdentity 202anonymousIdentity = WindowsIdentity.GetAnonymous(); 473public WindowsIdentity LogonUserIdentity 483WindowsIdentity identity = user.Identity as WindowsIdentity; 493WindowsIdentity HttpChannelListener.IHttpAuthenticationContext.LogonUserIdentity
System.ServiceModel.Internals (1)
System\Runtime\Diagnostics\EventLogger.cs (1)
134SecurityIdentifier sid = WindowsIdentity.GetCurrent().User;
System.ServiceModel.Routing (3)
System\ServiceModel\Routing\MessageRpc.cs (3)
38WindowsIdentity windowsIdentity; 55this.windowsIdentity = WindowsIdentity.GetCurrent(true); 67autoRevert = WindowsIdentity.Impersonate(IntPtr.Zero);
System.Web (47)
Abstractions\HttpRequestBase.cs (1)
168public virtual WindowsIdentity LogonUserIdentity {
Abstractions\HttpRequestWrapper.cs (1)
195public override WindowsIdentity LogonUserIdentity {
Cache\SqlCacheDependency.cs (1)
1137"; running as " + WindowsIdentity.GetCurrent().Name);
Configuration\AuthorizationRule.cs (1)
471if (user.Identity is WindowsIdentity) {
Configuration\RemoteWebConfigurationHost.cs (1)
36private WindowsIdentity _Identity;
Configuration\RemoteWebConfigurationHostStream.cs (2)
28private WindowsIdentity _Identity; 34internal RemoteWebConfigurationHostStream(bool streamForWrite, string serverName, string streamName, string templateStreamName, string username, string domain, string password, WindowsIdentity identity) {
DataAccess\DataConnectionHelper.cs (2)
76WindowsIdentity id = WindowsIdentity.GetCurrent();
Hosting\IIS7WorkerRequest.cs (3)
1927WindowsIdentity wi = user.Identity as WindowsIdentity; 2296user = new WindowsPrincipal((WindowsIdentity)identity);
HttpApplication.cs (2)
1240internal static WindowsIdentity GetCurrentWindowsIdentityWithAssert() { 1241return WindowsIdentity.GetCurrent();
HttpRequest.cs (2)
99private WindowsIdentity _logonUserIdentity; 2531public WindowsIdentity LogonUserIdentity {
HttpRuntime.cs (1)
3498return WindowsIdentity.GetCurrent().Name;
Management\WebEvents.cs (3)
1959WindowsIdentity winIdentity = _iprincipal.Identity as WindowsIdentity; 1978_accountName = WindowsIdentity.GetCurrent().Name;
RootedObjects.cs (2)
160WindowsIdentity identity = Principal.Identity as WindowsIdentity; // original code only disposed of WindowsIdentity, not arbitrary IDisposable types
Security\AuthStoreRoleProvider.cs (4)
650if (context != null && context.User != null && context.User.Identity != null && context.User.Identity is WindowsIdentity && 653return ((WindowsIdentity)context.User.Identity).Token; 657if (user != null && user.Identity != null && user.Identity is WindowsIdentity && 660return ((WindowsIdentity)user.Identity).Token;
Security\FileAuthorizationModule.cs (1)
143context.User.Identity is WindowsIdentity;
Security\WindowsAuthenticationEventArgs.cs (3)
25private WindowsIdentity _Identity; 56public WindowsIdentity Identity { get { return _Identity;}} 63public WindowsAuthenticationEventArgs(WindowsIdentity identity, HttpContext context) {
Security\WindowsAuthenticationModule.cs (4)
34private static readonly WindowsIdentity AnonymousIdentity = WindowsIdentity.GetAnonymous(); 121WindowsIdentity identity = null; 132identity = user.Identity as WindowsIdentity;
Security\WindowsTokenRoleProvider.cs (6)
76WindowsIdentity wi = GetCurrentWindowsIdentityAndCheckName(username); 190private WindowsIdentity GetCurrentWindowsIdentityAndCheckName(string userName) 196if (!(context.User.Identity is WindowsIdentity)) 200return (WindowsIdentity)context.User.Identity; 203if (user == null || user.Identity == null || !(user.Identity is WindowsIdentity)) 207return (WindowsIdentity)user.Identity;
State\sqlstateclientmanager.cs (3)
350Debug.Trace("SessionStatePooling", "Calling GetConnection under " + WindowsIdentity.GetCurrent().Name); 1184Debug.Trace("SessionStateConnectionIdentity", "Connecting under " + WindowsIdentity.GetCurrent().Name); 1211user = WindowsIdentity.GetCurrent().Name;
WebSockets\AspNetWebSocketContext.cs (1)
103public virtual WindowsIdentity LogonUserIdentity {
WebSockets\AspNetWebSocketContextImpl.cs (1)
147public override WindowsIdentity LogonUserIdentity {
WorkerRequest.cs (2)
596internal WindowsIdentity GetLogonUserIdentity() { 610private static WindowsIdentity CreateWindowsIdentityWithAssert(IntPtr token, string authType, WindowsAccountType accountType, bool isAuthenticated) {
System.Web.Extensions (4)
ClientServices\Providers\ClientFormsAuthenticationMembershipProvider.cs (1)
229Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
ClientServices\Providers\ClientWindowsAuthenticationMembershipProvider.cs (3)
29WindowsIdentity id = WindowsIdentity.GetCurrent(); 40Thread.CurrentPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
System.Workflow.Activities (4)
Executors\WorkflowWebService.cs (2)
183WindowsIdentity windowsIdentity = identity as WindowsIdentity;
LocalService\WorkflowMessageEventHandler.cs (2)
121WindowsIdentity windowsIdentity = identity as WindowsIdentity;
System.WorkflowServices (2)
System\Workflow\Runtime\Hosting\ChannelManagerHelpers.cs (2)
45WindowsIdentity identity = WindowsIdentity.GetCurrent();
System.Xml (2)
System\Xml\Serialization\Compiler.cs (2)
259WindowsIdentity id = WindowsIdentity.GetCurrent();
WindowsBase (1)
Shared\MS\Internal\IO\Packaging\PackagingUtilities.cs (1)
564string userSid = System.Security.Principal.WindowsIdentity.GetCurrent().User.Value;
WsatUI (1)
MMCUI\WSATControl.cs (1)
172WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());