1 write to User
Microsoft.AspNetCore.Authorization (1)
AuthorizationHandlerContext.cs (1)
36User = user;
15 references to User
BasicTestApp (1)
Program.cs (1)
39policy.RequireAssertion(ctx => ctx.User.Identity.Name?.StartsWith('B') ?? false));
BasicWebSite (1)
ManagerHandler.cs (1)
13if (context.User.HasClaim("Manager", "yes"))
CustomPolicyProvider (1)
Authorization\MinimumAgeAuthorizationHandler.cs (1)
32var dateOfBirthClaim = context.User.FindFirst(c => c.Type == ClaimTypes.DateOfBirth);
Microsoft.AspNetCore.Authorization (8)
ClaimsAuthorizationRequirement.cs (3)
53if (context.User != null) 58foreach (var claim in context.User.Claims) 69foreach (var claim in context.User.Claims)
DenyAnonymousAuthorizationRequirement.cs (1)
24var user = context.User;
NameAuthorizationRequirement.cs (2)
40if (context.User != null) 44foreach (var identity in context.User.Identities)
RolesAuthorizationRequirement.cs (2)
45if (context.User != null) 51if (context.User.IsInRole(role))
Microsoft.AspNetCore.Authorization.Test (1)
DefaultAuthorizationServiceTests.cs (1)
831if (context.User.HasClaim("SuperUser", "yes"))
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (1)
2315Assert.Equal(context.User, resource.Context.User);
TestAuthHandler.cs (1)
19var hasClaim = context.User.HasClaim(o => o.Type == ClaimTypes.NameIdentifier && !string.IsNullOrEmpty(o.Value));
StaticFilesAuth (1)
Startup.cs (1)
39var userName = context.User.Identity.Name;