6 writes to Principal
Microsoft.AspNetCore.Authentication.Cookies (6)
CookieSignedInContext.cs (1)
30Principal = principal;
CookieSigningInContext.cs (1)
33Principal = principal;
CookieSlidingExpirationContext.cs (1)
28Principal = ticket.Principal;
CookieValidatePrincipalContext.cs (3)
26Principal = ticket.Principal; 39public void ReplacePrincipal(ClaimsPrincipal principal) => Principal = principal; 45public void RejectPrincipal() => Principal = null;
27 references to Principal
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
754var claimsIdentity = (ClaimsIdentity)context.Principal!.Identity!;
Microsoft.AspNetCore.Authentication.Cookies (5)
CookieAuthenticationHandler.cs (5)
216if (context.Principal == null) 223RequestRefresh(result.Ticket, context.Principal); 226return AuthenticateResult.Success(new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name)); 335var ticket = new AuthenticationTicket(signInContext.Principal!, signInContext.Properties, signInContext.Scheme.Name); 367signInContext.Principal!,
Microsoft.AspNetCore.Authentication.Test (4)
CookieTests.cs (4)
774var id = ctx.Principal.Identities.First(); 830var id = ctx.Principal.Identities.First(); 1065Assert.Single(c.Principal.Identities); 1066Assert.True(c.Principal.Identities.First().HasClaim("marker", "true"));
Microsoft.AspNetCore.Identity (2)
SecurityStampValidator.cs (2)
100CurrentPrincipal = context.Principal, 150var user = await VerifySecurityStamp(context.Principal);
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\FunctionalTestsServiceCollectionExtensions.cs (1)
37captureUser(context.Principal);
Microsoft.AspNetCore.Identity.Test (14)
SecurityStampValidatorTest.cs (14)
89Assert.NotNull(context.Principal); 91Assert.NotNull(context.Principal); 147Assert.NotNull(context.Principal); 149Assert.Null(context.Principal); 188Assert.NotNull(context.Principal); 190Assert.NotNull(context.Principal); 229Assert.NotNull(context.Principal); 231Assert.Null(context.Principal); 266Assert.NotNull(context.Principal); 268Assert.NotNull(context.Principal); 309Assert.NotNull(context.Principal); 317Assert.NotNull(context.Principal); 353Assert.NotNull(context.Principal); 355Assert.Equal(validationSuccess, context.Principal != null);