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