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