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