224 references to TokenImpersonationLevel
mscorlib (14)
system\security\principal\windowsidentity.cs (11)
79private volatile TokenImpersonationLevel m_impersonationLevel; 334public TokenImpersonationLevel ImpersonationLevel { 340TokenImpersonationLevel impersonationLevel = TokenImpersonationLevel.None; 343impersonationLevel = TokenImpersonationLevel.Anonymous; 348impersonationLevel = TokenImpersonationLevel.None; // primary token; 353impersonationLevel = (TokenImpersonationLevel)level + 1; 404TokenImpersonationLevel til = ImpersonationLevel; 408if (til == TokenImpersonationLevel.None) { 412(uint) TokenImpersonationLevel.Identification, 420if (!Win32Native.CheckTokenMembership((til != TokenImpersonationLevel.None ? m_safeTokenHandle : token),
system\security\principal\windowsprincipal.cs (3)
240if (m_identity.ImpersonationLevel == TokenImpersonationLevel.None) { 244(uint) TokenImpersonationLevel.Identification, 252if (!Win32Native.CheckTokenMembership((m_identity.ImpersonationLevel != TokenImpersonationLevel.None ? m_identity.AccessToken : token),
System (43)
net\System\Net\_NTAuthentication.cs (3)
357if (request.ImpersonationLevel == TokenImpersonationLevel.Anonymous) 359else if(request.ImpersonationLevel == TokenImpersonationLevel.Identification) 361else if(request.ImpersonationLevel == TokenImpersonationLevel.Delegation)
net\System\Net\SecureProtocols\_NegoState.cs (14)
60private TokenImpersonationLevel _ExpectedImpersonationLevel; 94TokenImpersonationLevel impersonationLevel) 129TokenImpersonationLevel impersonationLevel 149if (impersonationLevel != TokenImpersonationLevel.Identification && 150impersonationLevel != TokenImpersonationLevel.Impersonation && 151impersonationLevel != TokenImpersonationLevel.Delegation) 166_ExpectedImpersonationLevel = isServer? impersonationLevel: TokenImpersonationLevel.None; 201if (impersonationLevel == TokenImpersonationLevel.Identification) {flags |= ContextFlags.InitIdentify;} 202if (impersonationLevel == TokenImpersonationLevel.Delegation) {flags |= ContextFlags.Delegate;} 295internal TokenImpersonationLevel AllowedImpersonation { 302private TokenImpersonationLevel PrivateImpersonationLevel { 305return (_Context.IsDelegationFlag && _Context.ProtocolName != NegotiationInfoClass.NTLM) ? TokenImpersonationLevel.Delegation 306:_Context.IsIdentifyFlag? TokenImpersonationLevel.Identification 307:TokenImpersonationLevel.Impersonation;
net\System\Net\SecureProtocols\NegotiateStream.cs (23)
69AuthenticateAsClient((NetworkCredential)CredentialCache.DefaultCredentials, null, string.Empty, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification); 73AuthenticateAsClient(credential, null, targetName, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification); 77AuthenticateAsClient(credential, binding, targetName, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification); 84TokenImpersonationLevel allowedImpersonationLevel) //this OR LOWER will be ultimate result in auth context 93TokenImpersonationLevel allowedImpersonationLevel) 109ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, 117ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, 125ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, 133TokenImpersonationLevel allowedImpersonationLevel, //this OR LOWER will be ultimate result in auth context 147TokenImpersonationLevel allowedImpersonationLevel, 181AuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, null, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification); 186AuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification); 191TokenImpersonationLevel requiredImpersonationLevel) //throw if the result is below than this 199TokenImpersonationLevel requiredImpersonationLevel) 215return BeginAuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, null, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, asyncCallback, asyncState); 221return BeginAuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, asyncCallback, asyncState); 227TokenImpersonationLevel requiredImpersonationLevel, //throw if the result is below than this 238TokenImpersonationLevel requiredImpersonationLevel, //throw if the result is below than this 284TokenImpersonationLevel allowedImpersonationLevel) 299TokenImpersonationLevel allowedImpersonationLevel) 317public virtual Task AuthenticateAsServerAsync(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel) 326TokenImpersonationLevel requiredImpersonationLevel) 397public virtual TokenImpersonationLevel ImpersonationLevel
net\System\Net\WebRequest.cs (3)
54private TokenImpersonationLevel m_ImpersonationLevel; 551m_ImpersonationLevel = TokenImpersonationLevel.Delegation; 1004public TokenImpersonationLevel ImpersonationLevel {
System.Core (14)
System\IO\Pipes\Pipe.cs (14)
984private TokenImpersonationLevel m_impersonationLevel; 993: this(".", pipeName, PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.None, HandleInheritability.None) { } 998: this(serverName, pipeName, PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.None, HandleInheritability.None) { } 1003: this(serverName, pipeName, direction, PipeOptions.None, TokenImpersonationLevel.None, HandleInheritability.None) { } 1009: this(serverName, pipeName, direction, options, TokenImpersonationLevel.None, HandleInheritability.None) { } 1014PipeOptions options, TokenImpersonationLevel impersonationLevel) 1020PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability) 1038if (impersonationLevel < TokenImpersonationLevel.None || impersonationLevel > TokenImpersonationLevel.Delegation) { 1069PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability) 1087if (impersonationLevel < TokenImpersonationLevel.None || impersonationLevel > TokenImpersonationLevel.Delegation) { 1173if (m_impersonationLevel != TokenImpersonationLevel.None) { 1279if (m_impersonationLevel != TokenImpersonationLevel.None) {
System.IdentityModel (15)
System\IdentityModel\Selectors\KerberosSecurityTokenProvider.cs (7)
15TokenImpersonationLevel tokenImpersonationLevel; 19: this(servicePrincipalName, TokenImpersonationLevel.Identification) 23public KerberosSecurityTokenProvider(string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel) 28public KerberosSecurityTokenProvider(string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential) 32if (tokenImpersonationLevel != TokenImpersonationLevel.Identification && tokenImpersonationLevel != TokenImpersonationLevel.Impersonation) 48public TokenImpersonationLevel TokenImpersonationLevel
System\IdentityModel\Tokens\KerberosRequestorSecurityToken.cs (8)
28: this(servicePrincipalName, TokenImpersonationLevel.Impersonation, null, SecurityUniqueId.Create().Value, null) 32public KerberosRequestorSecurityToken(string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential, string id) 37internal KerberosRequestorSecurityToken(string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential, string id, ChannelBinding channelBinding) 42internal KerberosRequestorSecurityToken(string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential, string id, SafeFreeCredentials credentialsHandle, ChannelBinding channelBinding) 46if (tokenImpersonationLevel != TokenImpersonationLevel.Identification && tokenImpersonationLevel != TokenImpersonationLevel.Impersonation) 126void Initialize(TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential, SafeFreeCredentials credentialsHandle, ChannelBinding channelBinding) 154if (tokenImpersonationLevel == TokenImpersonationLevel.Identification)
System.Runtime.Remoting (21)
channels\ipc\ipcclientchannel.cs (5)
256private TokenImpersonationLevel _tokenImpersonationLevel = TokenImpersonationLevel.Identification; 411case TokenImpersonationLevelKey: _tokenImpersonationLevel = (TokenImpersonationLevel)(value is TokenImpersonationLevel ? value : 412Enum.Parse(typeof(TokenImpersonationLevel),
channels\ipc\ipcport.cs (5)
118internal static IpcPort Connect(String portName, bool secure, TokenImpersonationLevel impersonationLevel, int timeout) 127case TokenImpersonationLevel.None: 130case TokenImpersonationLevel.Identification: 133case TokenImpersonationLevel.Impersonation: 136case TokenImpersonationLevel.Delegation:
channels\ipc\ipcserverchannel.cs (2)
419if (identity.ImpersonationLevel == TokenImpersonationLevel.Impersonation || 420identity.ImpersonationLevel == TokenImpersonationLevel.Delegation)
channels\ipc\portcache.cs (1)
90public IpcPort GetConnection(String portName, bool secure, TokenImpersonationLevel level, int timeout)
channels\tcp\tcpclientchannel.cs (5)
346private TokenImpersonationLevel _tokenImpersonationLevel = TokenImpersonationLevel.Identification; // default is no authentication 618case TokenImpersonationLevelKey: _tokenImpersonationLevel = (TokenImpersonationLevel)(value is TokenImpersonationLevel ? value : 619Enum.Parse(typeof(TokenImpersonationLevel),
channels\tcp\tcpserverchannel.cs (3)
500TokenImpersonationLevel impLevel = TokenImpersonationLevel.Identification; 502impLevel = TokenImpersonationLevel.Impersonation;
System.ServiceModel (107)
System\ServiceModel\Channels\HttpChannelFactory.cs (9)
611AuthenticationLevel authenticationLevel, TokenImpersonationLevel impersonationLevel) 634TokenImpersonationLevel impersonationLevel, SecurityTokenContainer clientCertificateToken) 732TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel, 886TokenImpersonationLevel impersonationLevel; 1956SetupWebRequest(AuthenticationLevel.None, TokenImpersonationLevel.None, null); 2009SetupWebRequest(AuthenticationLevel.None, TokenImpersonationLevel.None, credential); 2015TokenImpersonationLevel impersonationLevel; 2035void SetupWebRequest(AuthenticationLevel authenticationLevel, TokenImpersonationLevel impersonationLevel, NetworkCredential credential) 2148TokenImpersonationLevel impersonationLevel;
System\ServiceModel\Channels\HttpChannelHelpers.cs (7)
3437out TokenImpersonationLevel impersonationLevel, out AuthenticationLevel authenticationLevel) 3439impersonationLevel = TokenImpersonationLevel.None; 3455out TokenImpersonationLevel impersonationLevel, out AuthenticationLevel authenticationLevel) 3457impersonationLevel = TokenImpersonationLevel.None; 3466impersonationLevel = TokenImpersonationLevel.Delegation; 3804public static void ValidateDigestCredential(ref NetworkCredential credential, TokenImpersonationLevel impersonationLevel) 3813TokenImpersonationLevel.Impersonation))
System\ServiceModel\Channels\TransportDefaults.cs (2)
197internal const TokenImpersonationLevel ImpersonationLevel = TokenImpersonationLevel.Identification;
System\ServiceModel\Channels\TransportSecurityHelpers.cs (11)
234out TokenImpersonationLevel impersonationLevel, out AuthenticationLevel authenticationLevel) 240out TokenImpersonationLevel impersonationLevel, out bool allowNtlm) 247out TokenImpersonationLevel impersonationLevel, out AuthenticationLevel authenticationLevel) 260out TokenImpersonationLevel impersonationLevel, out bool allowNtlm) 285TokenImpersonationLevel dummyImpersonationLevel; 308out bool extractGroupsForWindowsAccounts, out TokenImpersonationLevel impersonationLevel, 313impersonationLevel = TokenImpersonationLevel.Identification; 632TokenImpersonationLevel impersonationLevel; 641this.impersonationLevel = TokenImpersonationLevel.Identification; 716out TokenImpersonationLevel impersonationLevel, out AuthenticationLevel authenticationLevel) 726out TokenImpersonationLevel impersonationLevel, out bool allowNtlm)
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (3)
213TokenImpersonationLevel.Identification); 287this.acceptor.parent.ProtectionLevel, TokenImpersonationLevel.Identification, callback, this); 308TokenImpersonationLevel impersonationLevel;
System\ServiceModel\ComIntegration\ChannelCredentials.cs (1)
78channelCredentials.Windows.AllowedImpersonationLevel = (TokenImpersonationLevel)impersonationLevel;
System\ServiceModel\Configuration\HttpDigestClientElement.cs (2)
24public TokenImpersonationLevel ImpersonationLevel 26get { return (TokenImpersonationLevel)base[ConfigurationStrings.ImpersonationLevel]; }
System\ServiceModel\Configuration\Properties.cs (4)
1286properties.Add(new ConfigurationProperty("impersonationLevel", typeof(System.Security.Principal.TokenImpersonationLevel), System.Security.Principal.TokenImpersonationLevel.Identification, null, new System.ServiceModel.Configuration.ServiceModelEnumValidator(typeof(System.ServiceModel.Security.TokenImpersonationLevelHelper)), System.Configuration.ConfigurationPropertyOptions.None)); 3686properties.Add(new ConfigurationProperty("allowedImpersonationLevel", typeof(System.Security.Principal.TokenImpersonationLevel), System.Security.Principal.TokenImpersonationLevel.Identification, null, new System.ServiceModel.Configuration.ServiceModelEnumValidator(typeof(System.ServiceModel.Security.TokenImpersonationLevelHelper)), System.Configuration.ConfigurationPropertyOptions.None));
System\ServiceModel\Configuration\WindowsClientElement.cs (2)
31public TokenImpersonationLevel AllowedImpersonationLevel 33get { return (TokenImpersonationLevel)base[ConfigurationStrings.AllowedImpersonationLevel]; }
System\ServiceModel\Security\HttpDigestClientCredential.cs (2)
13TokenImpersonationLevel allowedImpersonationLevel = WindowsClientCredential.DefaultImpersonationLevel; 29public TokenImpersonationLevel AllowedImpersonationLevel
System\ServiceModel\Security\SecurityUtils.cs (42)
133internal static bool IsDefined(TokenImpersonationLevel value) 135return (value == TokenImpersonationLevel.None 136|| value == TokenImpersonationLevel.Anonymous 137|| value == TokenImpersonationLevel.Identification 138|| value == TokenImpersonationLevel.Impersonation 139|| value == TokenImpersonationLevel.Delegation); 142internal static void Validate(TokenImpersonationLevel value) 147typeof(TokenImpersonationLevel))); 151static TokenImpersonationLevel[] TokenImpersonationLevelOrder = new TokenImpersonationLevel[] 153TokenImpersonationLevel.None, 154TokenImpersonationLevel.Anonymous, 155TokenImpersonationLevel.Identification, 156TokenImpersonationLevel.Impersonation, 157TokenImpersonationLevel.Delegation 160internal static string ToString(TokenImpersonationLevel impersonationLevel) 162if (impersonationLevel == TokenImpersonationLevel.Identification) 166else if (impersonationLevel == TokenImpersonationLevel.None) 170else if (impersonationLevel == TokenImpersonationLevel.Anonymous) 174else if (impersonationLevel == TokenImpersonationLevel.Impersonation) 178else if (impersonationLevel == TokenImpersonationLevel.Delegation) 185typeof(TokenImpersonationLevel))); 188internal static bool IsGreaterOrEqual(TokenImpersonationLevel x, TokenImpersonationLevel y) 209internal static int Compare(TokenImpersonationLevel x, TokenImpersonationLevel y) 217case TokenImpersonationLevel.Identification: 220case TokenImpersonationLevel.Impersonation: 223case TokenImpersonationLevel.Identification: 226case TokenImpersonationLevel.Delegation: 231typeof(TokenImpersonationLevel))); 235case TokenImpersonationLevel.Delegation: 240typeof(TokenImpersonationLevel))); 511internal static bool AllowsImpersonation(WindowsIdentity windowsIdentity, TokenImpersonationLevel impersonationLevel) 518if (impersonationLevel == TokenImpersonationLevel.Identification) 525case TokenImpersonationLevel.None: 526case TokenImpersonationLevel.Anonymous: 527case TokenImpersonationLevel.Identification: 529case TokenImpersonationLevel.Impersonation: 530if (impersonationLevel == TokenImpersonationLevel.Delegation) 533case TokenImpersonationLevel.Delegation: 1122AuthenticationLevel authenticationLevel, TokenImpersonationLevel impersonationLevel)
System\ServiceModel\Security\SpnegoTokenProvider.cs (4)
26TokenImpersonationLevel allowedImpersonationLevel = TokenImpersonationLevel.Identification; 59public TokenImpersonationLevel AllowedImpersonationLevel 70if (value == TokenImpersonationLevel.None)
System\ServiceModel\Security\SspiSecurityTokenProvider.cs (1)
23public SspiSecurityTokenProvider(NetworkCredential credential, bool allowNtlm, TokenImpersonationLevel impersonationLevel)
System\ServiceModel\Security\Tokens\SspiSecurityToken.cs (3)
18TokenImpersonationLevel impersonationLevel; 26public SspiSecurityToken(TokenImpersonationLevel impersonationLevel, bool allowNtlm, NetworkCredential networkCredential) 72public TokenImpersonationLevel ImpersonationLevel
System\ServiceModel\Security\WindowsClientCredential.cs (6)
14internal const TokenImpersonationLevel DefaultImpersonationLevel = TokenImpersonationLevel.Identification; 15TokenImpersonationLevel allowedImpersonationLevel = DefaultImpersonationLevel; 33public TokenImpersonationLevel AllowedImpersonationLevel 43if (((value == TokenImpersonationLevel.None) || (value == TokenImpersonationLevel.Anonymous)) && System.ServiceModel.Channels.UnsafeNativeMethods.IsTailoredApplication.Value)
System\ServiceModel\Security\WindowsSspiNegotiation.cs (8)
35TokenImpersonationLevel impersonationLevel; 54internal WindowsSspiNegotiation(string package, SafeFreeCredentials credentialsHandle, TokenImpersonationLevel impersonationLevel, string servicePrincipalName, bool doMutualAuth, bool interactiveLogonEnabled, bool ntlmEnabled) 62: this(true, package, credentialsHandle, TokenImpersonationLevel.Delegation, defaultServiceBinding, false, false, true) 65WindowsSspiNegotiation(bool isServer, string package, SafeFreeCredentials credentialsHandle, TokenImpersonationLevel impersonationLevel, string servicePrincipalName, bool doMutualAuth, bool interactiveLogonEnabled, bool ntlmEnabled) 73this.impersonationLevel = TokenImpersonationLevel.Delegation; 336if (this.impersonationLevel == TokenImpersonationLevel.Delegation) 340else if (this.isServer == false && this.impersonationLevel == TokenImpersonationLevel.Identification) 344else if (this.isServer == false && this.impersonationLevel == TokenImpersonationLevel.Anonymous)
System.ServiceModel.Activities (9)
System\ServiceModel\Activities\InternalSendMessage.cs (5)
76this.TokenImpersonationLevel = TokenImpersonationLevel.Identification; 89public TokenImpersonationLevel TokenImpersonationLevel 3037TokenImpersonationLevel tokenImpersonationLevel; 3043TokenImpersonationLevel tokenImpersonationLevel, ContractDescription contractDescription, 3070public TokenImpersonationLevel TokenImpersonationLevel
System\ServiceModel\Activities\Send.cs (3)
41this.TokenImpersonationLevel = TokenImpersonationLevel.Identification; 208[DefaultValue(TokenImpersonationLevel.Identification)] 209public TokenImpersonationLevel TokenImpersonationLevel
System\ServiceModel\Activities\SendSettings.cs (1)
21public TokenImpersonationLevel TokenImpersonationLevel { get; set; }
System.ServiceModel.Routing (1)
System\ServiceModel\Routing\MessageRpc.cs (1)
58if (this.windowsIdentity == null || this.windowsIdentity.ImpersonationLevel != TokenImpersonationLevel.Impersonation)