5 implementations of Identity
mscorlib (1)
system\security\claims\ClaimsPrincipal.cs (1)
743
public virtual System.Security.Principal.IIdentity
Identity
System.ServiceModel (2)
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (1)
462
public IIdentity
Identity
System\ServiceModel\Security\RoleProviderPrincipal.cs (1)
24
public IIdentity
Identity
System.Web (1)
Hosting\IIS7UserPrincipal.cs (1)
28
public IIdentity
Identity
{
System.Web.Extensions (1)
ClientServices\ClientRolePrincipal.cs (1)
14
public IIdentity
Identity
{ get { return _Identity; } }
150 references to Identity
mscorlib (2)
system\security\claims\ClaimsPrincipal.cs (1)
232
m_identities.Add(new ClaimsIdentity(principal.
Identity
));
system\security\permissions\principalpermission.cs (1)
485
IIdentity identity = principal.
Identity
;
System (8)
net\System\Net\HttpListener.cs (1)
1774
GlobalLog.Print("HttpListener#" + ValidationHelper.HashString(this) + "::HandleAuthentication() got principal:" + ValidationHelper.ToString(principal) + " principal.Identity.Name:" + ValidationHelper.ToString(principal.
Identity
.Name) + " creating request");
net\System\Net\HttpListenerContext.cs (3)
206
IDisposable user = m_User == null ? null : m_User.
Identity
as IDisposable;
210
(m_User.
Identity
.AuthenticationType != NTLM) &&
227
IDisposable user = m_User == null ? null : m_User.
Identity
as IDisposable;
net\System\Net\HttpListenerRequest.cs (2)
457
return user != null && user.
Identity
!= null && user.
Identity
.IsAuthenticated;
net\System\Net\WebSockets\HttpListenerWebSocketContext.cs (2)
139
HttpListenerBasicIdentity basicIdentity = user.
Identity
as HttpListenerBasicIdentity;
149
WindowsIdentity windowsIdentity = (WindowsIdentity)user.
Identity
;
System.ServiceModel (6)
System\ServiceModel\Channels\HttpChannelListener.cs (4)
321
if ((principal != null) && (principal.
Identity
!= null))
323
authType = principal.
Identity
.AuthenticationType;
558
wid = listenerContext.User.
Identity
as WindowsIdentity;
563
identity = listenerContext.User.
Identity
as HttpListenerBasicIdentity;
System\ServiceModel\Channels\ServiceWebSocketContext.cs (2)
41
get { return this.user != null ? this.user.
Identity
!= null && this.user.
Identity
.IsAuthenticated : this.context.IsAuthenticated; }
System.ServiceModel.Activation (1)
System\ServiceModel\Activation\HostedHttpRequestAsyncResult.cs (1)
483
WindowsIdentity identity = user.
Identity
as WindowsIdentity;
System.ServiceModel.Web (3)
System\ServiceModel\Dispatcher\JavascriptCallbackMessageInspector.cs (2)
36
HttpContext.Current.User.
Identity
!= null &&
37
HttpContext.Current.User.
Identity
.IsAuthenticated)
System\ServiceModel\Web\CachingParameterInspector.cs (1)
111
if (HttpContext.Current.User.
Identity
.IsAuthenticated)
System.Web (77)
Configuration\AuthorizationRule.cs (3)
461
if (_AnonUserSpecified && !user.
Identity
.IsAuthenticated) {
471
if (user.
Identity
is WindowsIdentity) {
482
if (users.Count > 0 && FindUser(users, user.
Identity
.Name)) {
Configuration\AuthorizationRuleCollection.cs (1)
108
if (!user.
Identity
.IsAuthenticated && _iAnonymousAllowed != 0)
Hosting\IIS7WorkerRequest.cs (4)
1924
if (user.
Identity
!= null) {
1925
userName = user.
Identity
.Name;
1926
authType = user.
Identity
.AuthenticationType;
1927
WindowsIdentity wi = user.
Identity
as WindowsIdentity;
HttpContext.cs (2)
1278
_Profile = ProfileBase.Create(Request.IsAuthenticated ? User.
Identity
.Name : Request.AnonymousID, Request.IsAuthenticated);
1897
if (!User.
Identity
.IsAuthenticated)
HttpRequest.cs (6)
509
if (_context.User != null && _context.User.
Identity
.IsAuthenticated)
510
value = _context.User.
Identity
.AuthenticationType;
515
if (_context.User != null && _context.User.
Identity
.IsAuthenticated)
516
value = _context.User.
Identity
.Name;
1375
return(_context.User != null && _context.User.
Identity
!= null && _context.User.
Identity
.IsAuthenticated);
HttpResponse.cs (2)
2561
userName = _context.User.
Identity
.Name;
2562
userAuthType = _context.User.
Identity
.AuthenticationType;
Management\EventlogProvider.cs (1)
89
IIdentity id = iprincipal.
Identity
;
Management\WebEvents.cs (14)
1283
fields.Add(new WebEventFieldData("UserName", RequestInformation.Principal.
Identity
.Name, WebEventFieldType.String));
1284
fields.Add(new WebEventFieldData("UserAuthenticated", RequestInformation.Principal.
Identity
.IsAuthenticated.ToString(), WebEventFieldType.Bool));
1285
fields.Add(new WebEventFieldData("UserAuthenticationType", RequestInformation.Principal.
Identity
.AuthenticationType, WebEventFieldType.String));
1458
fields.Add(new WebEventFieldData("UserName", RequestInformation.Principal.
Identity
.Name, WebEventFieldType.String));
1459
fields.Add(new WebEventFieldData("UserAuthenticated", RequestInformation.Principal.
Identity
.IsAuthenticated.ToString(), WebEventFieldType.Bool));
1460
fields.Add(new WebEventFieldData("UserAuthenticationType", RequestInformation.Principal.
Identity
.AuthenticationType, WebEventFieldType.String));
1557
fields.Add(new WebEventFieldData("UserName", RequestInformation.Principal.
Identity
.Name, WebEventFieldType.String));
1558
fields.Add(new WebEventFieldData("UserAuthenticated", RequestInformation.Principal.
Identity
.IsAuthenticated.ToString(), WebEventFieldType.Bool));
1559
fields.Add(new WebEventFieldData("UserAuthenticationType", RequestInformation.Principal.
Identity
.AuthenticationType, WebEventFieldType.String));
1617
fields.Add(new WebEventFieldData("UserName", RequestInformation.Principal.
Identity
.Name, WebEventFieldType.String));
1618
fields.Add(new WebEventFieldData("UserAuthenticated", RequestInformation.Principal.
Identity
.IsAuthenticated.ToString(), WebEventFieldType.Bool));
1619
fields.Add(new WebEventFieldData("UserAuthenticationType", RequestInformation.Principal.
Identity
.AuthenticationType, WebEventFieldType.String));
1959
WindowsIdentity winIdentity = _iprincipal.
Identity
as WindowsIdentity;
2004
IIdentity id = Principal.
Identity
;
Management\wmiprovider.cs (1)
105
IIdentity id = iprincipal.
Identity
;
Profile\SqlProfileProvider.cs (1)
154
sName = (context.Request.IsAuthenticated ? context.User.
Identity
.Name : context.Request.AnonymousID);
RootedObjects.cs (1)
160
WindowsIdentity identity = Principal.
Identity
as WindowsIdentity; // original code only disposed of WindowsIdentity, not arbitrary IDisposable types
Security\AuthStoreRoleProvider.cs (8)
650
if (context != null && context.User != null && context.User.
Identity
!= null && context.User.
Identity
is WindowsIdentity &&
651
StringUtil.EqualsIgnoreCase(userName, context.User.
Identity
.Name))
653
return ((WindowsIdentity)context.User.
Identity
).Token;
657
if (user != null && user.
Identity
!= null && user.
Identity
is WindowsIdentity &&
658
StringUtil.EqualsIgnoreCase(userName, user.
Identity
.Name))
660
return ((WindowsIdentity)user.
Identity
).Token;
Security\FileAuthorizationModule.cs (3)
142
context.User.
Identity
!= null &&
143
context.User.
Identity
is WindowsIdentity;
159
bool isAnonymousUser = (context.User == null || !context.User.
Identity
.IsAuthenticated);
Security\Membership.cs (3)
593
return cur.User.
Identity
.Name;
596
if (user == null || user.
Identity
== null)
599
return user.
Identity
.Name;
Security\PassportAuthenticationModule.cs (3)
169
if (!_fAuthChecked || !_fAuthRequired || context.User == null || context.User.
Identity
== null || !(context.User.
Identity
is PassportIdentity))
174
PassportIdentity id = (PassportIdentity) context.User.
Identity
;
Security\PassportIdentity.cs (2)
979
if (context.User.
Identity
is PassportIdentity) {
980
pi = (PassportIdentity) context.User.
Identity
;
Security\RoleManagerModule.cs (4)
102
if (context.User.
Identity
.IsAuthenticated && (!Roles.CookieRequireSSL || context.Request.IsSecureConnection))
121
context.SetPrincipalNoDemand(CreateRolePrincipalWithAssert(context.User.
Identity
, cookieValue));
140
context.SetPrincipalNoDemand(CreateRolePrincipalWithAssert(context.User.
Identity
));
165
if (context.User == null || !(context.User is RolePrincipal) || !context.User.
Identity
.IsAuthenticated)
Security\Roles.cs (4)
108
if (user != null && user is RolePrincipal && ((RolePrincipal)user).ProviderName == Provider.Name && StringUtil.EqualsIgnoreCase(username, user.
Identity
.Name))
145
if (user != null && user is RolePrincipal && ((RolePrincipal)user).ProviderName == Provider.Name && StringUtil.EqualsIgnoreCase(username, user.
Identity
.Name)) {
597
if (user == null || user.
Identity
== null)
600
return user.
Identity
.Name;
Security\UrlAuthorizationModule.cs (3)
114
if (context.User != null && context.User.
Identity
.IsAuthenticated) {
134
if (context.User == null || !context.User.
Identity
.IsAuthenticated)
150
if (context.User == null || !context.User.
Identity
.IsAuthenticated)
Security\WindowsTokenRoleProvider.cs (7)
196
if (!(context.User.
Identity
is WindowsIdentity))
198
if (!StringUtil.EqualsIgnoreCase(userName, context.User.
Identity
.Name))
200
return (WindowsIdentity)context.User.
Identity
;
203
if (user == null || user.
Identity
== null || !(user.
Identity
is WindowsIdentity))
205
if (!StringUtil.EqualsIgnoreCase(userName, user.
Identity
.Name))
207
return (WindowsIdentity)user.
Identity
;
State\sqlstateclientmanager.cs (1)
326
Debug.Trace("SessionStatePooling", "LOGON_USER = '" + logon + "'; identity = '" + _rqContext.User.
Identity
.Name + "'; IsUNC = " + HttpRuntime.IsOnUNCShareInternal);
UI\WebControls\LoginUtil.cs (1)
134
IIdentity identity = user.
Identity
;
UI\WebParts\PersonalizationProvider.cs (1)
203
userName = page.User.
Identity
.Name;
UI\WebParts\WebPartPersonalization.cs (1)
122
query.UsernameToMatch = page.User.
Identity
.Name;
System.Web.DataVisualization (4)
WebForm\General\ChartHttpHandler.cs (4)
1317
if (HttpContext.Current.User.
Identity
.IsAuthenticated)
1320
return HttpContext.Current.User.
Identity
.Name;
1332
if (!HttpContext.Current.User.
Identity
.IsAuthenticated)
1337
return HttpContext.Current.User.
Identity
.Name;
System.Web.Extensions (47)
ApplicationServices\ApplicationServiceHelper.cs (3)
82
IIdentity userIdentity = user.
Identity
;
213
if (user == null || user.
Identity
== null) {
217
return user.
Identity
.Name;
ApplicationServices\AuthenticationService.cs (1)
126
return HttpContext.Current.User.
Identity
.IsAuthenticated;
ApplicationServices\ProfileService.cs (4)
289
if (user == null || user.
Identity
== null || string.IsNullOrEmpty(user.
Identity
.Name)) { // anonymous user?
298
name = user.
Identity
.Name;
299
isAuthenticated = user.
Identity
.IsAuthenticated;
ClientServices\Providers\ClientFormsAuthenticationMembershipProvider.cs (13)
176
UserValidated(this, new UserValidatedEventArgs(Thread.CurrentPrincipal.
Identity
.Name));
184
UserValidated(this, new UserValidatedEventArgs(Thread.CurrentPrincipal.
Identity
.Name));
199
if (p == null || !(p.
Identity
is ClientFormsIdentity))
203
CookieContainer cookies = ((ClientFormsIdentity)p.
Identity
).AuthenticationCookies;
219
p.
Identity
.Name,
228
SqlHelper.DeleteAllCookies(p.
Identity
.Name, _ConnectionString, _ConnectionStringProvider);
290
if (Thread.CurrentPrincipal != null && Thread.CurrentPrincipal.
Identity
is ClientFormsIdentity)
291
currentUser = Thread.CurrentPrincipal.
Identity
.Name;
300
if ((Thread.CurrentPrincipal is ClientRolePrincipal) && (Thread.CurrentPrincipal.
Identity
is ClientFormsIdentity) && Thread.CurrentPrincipal.
Identity
.Name == username)
302
cookies = ((ClientFormsIdentity)Thread.CurrentPrincipal.
Identity
).AuthenticationCookies;
355
if ( !(Thread.CurrentPrincipal is ClientRolePrincipal) || !(Thread.CurrentPrincipal.
Identity
is ClientFormsIdentity) || Thread.CurrentPrincipal.
Identity
.Name != username)
ClientServices\Providers\ClientRoleProvider.cs (10)
115
if (p == null || p.
Identity
== null || !p.
Identity
.IsAuthenticated)
117
if (!string.IsNullOrEmpty(username) && string.Compare(username, p.
Identity
.Name, StringComparison.OrdinalIgnoreCase) != 0)
121
if (string.Compare(_CurrentUser, p.
Identity
.Name, StringComparison.OrdinalIgnoreCase) == 0 && DateTime.UtcNow < _CacheExpiryDate)
125
if (GetRolesFromDBForUser(p.
Identity
.Name)) // Return true, only if the roles are fresh. Also, sets _CurrentUser, _Roles and _CacheExpiryDate
133
_CurrentUser = p.
Identity
.Name;
134
GetRolesForUserCore(p.
Identity
);
135
if (!_HonorCookieExpiry && _Roles.Length < 1 && (p.
Identity
is ClientFormsIdentity))
137
((ClientFormsIdentity)p.
Identity
).RevalidateUser();
138
GetRolesForUserCore(p.
Identity
);
ClientServices\Providers\ClientSettingsProvider.cs (15)
77
IIdentity id = Thread.CurrentPrincipal.
Identity
;
237
_UserName = Thread.CurrentPrincipal.
Identity
.Name;
454
ClientFormsIdentity id = Thread.CurrentPrincipal.
Identity
as ClientFormsIdentity;
471
IIdentity id = Thread.CurrentPrincipal.
Identity
;
590
ClientFormsIdentity id = Thread.CurrentPrincipal.
Identity
as ClientFormsIdentity;
627
IIdentity id = Thread.CurrentPrincipal.
Identity
;
669
ClientData cd = ClientDataManager.GetUserClientData(Thread.CurrentPrincipal.
Identity
.Name, _UsingIsolatedStore);
683
using (DbConnection conn = SqlHelper.GetConnection(Thread.CurrentPrincipal.
Identity
.Name,
750
string username = Thread.CurrentPrincipal.
Identity
.Name;
830
ClientData cd = ClientDataManager.GetUserClientData(Thread.CurrentPrincipal.
Identity
.Name, _UsingIsolatedStore);
840
ClientData cd = ClientDataManager.GetUserClientData(Thread.CurrentPrincipal.
Identity
.Name, _UsingIsolatedStore);
850
ClientData cd = ClientDataManager.GetUserClientData(Thread.CurrentPrincipal.
Identity
.Name, _UsingIsolatedStore);
860
ClientData cd = ClientDataManager.GetUserClientData(Thread.CurrentPrincipal.
Identity
.Name, _UsingIsolatedStore);
869
string username = Thread.CurrentPrincipal.
Identity
.Name;
880
string username = Thread.CurrentPrincipal.
Identity
.Name;
ClientServices\Providers\ProxyHelper.cs (1)
274
username = Thread.CurrentPrincipal.
Identity
.Name;
System.Workflow.Activities (2)
Executors\WorkflowWebService.cs (1)
182
IIdentity identity = System.Threading.Thread.CurrentPrincipal.
Identity
;
LocalService\WorkflowMessageEventHandler.cs (1)
120
IIdentity identity = System.Threading.Thread.CurrentPrincipal.
Identity
;