210 references to ClaimsPrincipal
Aspire.Dashboard (5)
Aspire.Hosting (1)
BasicTestApp (1)
Certificate.Sample (1)
ClaimsTransformation (1)
CookiePolicySample (1)
Cookies (1)
CookieSample (1)
CookieSessionSample (1)
CustomAuthorizationFailureResponse (1)
CustomPolicyProvider (1)
HtmlGenerationWebSite (1)
Identity.DefaultUI.WebSite (1)
Microsoft.AspNetCore.Antiforgery.Test (20)
Microsoft.AspNetCore.Authentication.Certificate (1)
Microsoft.AspNetCore.Authentication.Cookies (2)
Microsoft.AspNetCore.Authentication.Core.Test (12)
AuthenticationServiceTests.cs (11)
92await context.SignInAsync("signin", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null);
107await context.SignInAsync("signin", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null);
123await context.SignInAsync("uber", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null);
124var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("base", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null));
127await context.SignInAsync("signin", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null);
128ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("signout", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null));
170ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever"))));
189await context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever")));
207await context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever")));
225var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever"))));
259new ClaimsPrincipal(new ClaimsIdentity("whatever")),
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
Microsoft.AspNetCore.Authentication.Test (53)
CookieTests.cs (29)
167new ClaimsPrincipal(user),
174new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies"))),
321new ClaimsPrincipal(user),
534new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies"))),
575new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
606new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
634new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
671new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
709ctx.ReplacePrincipal(new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice2", "Cookies2"))));
716new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
740ctx.ReplacePrincipal(new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice2", "Cookies2"))));
749new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
792new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
848new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
907new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
953new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
1005new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies")))));
1217new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies"))));
1356app.Run(context => context.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(new ClaimsIdentity("whatever"))));
1384app.Run(context => context.SignInAsync("Cookie1", new ClaimsPrincipal(new ClaimsIdentity("whatever"))));
1413new ClaimsPrincipal(new ClaimsIdentity("whatever")))));
1435app.Map("/login", signoutApp => signoutApp.Run(context => context.SignInAsync("Cookies", new ClaimsPrincipal(new ClaimsIdentity("whatever")))));
1565new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", CookieAuthenticationDefaults.AuthenticationScheme))),
1589new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", CookieAuthenticationDefaults.AuthenticationScheme))));
1611new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", CookieAuthenticationDefaults.AuthenticationScheme))));
1634new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", CookieAuthenticationDefaults.AuthenticationScheme))));
1656new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", CookieAuthenticationDefaults.AuthenticationScheme))),
1703new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies"))),
1771new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity("Alice", "Cookies"))));
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Authentication.WsFederation (1)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.Authorization.Test (41)
Microsoft.AspNetCore.Components.Authorization.Tests (5)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.CookiePolicy.Test (2)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Connections.Tests (3)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (17)
Microsoft.AspNetCore.Mvc.Core.Test (2)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
Microsoft.AspNetCore.Owin.Tests (3)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.Extensions.Identity.Core (1)
PathSchemeSelection (2)
SecurityWebSite (4)
StaticFilesAuth (1)