41 references to Principal
Aspire.Dashboard (1)
Authentication\AspirePolicyEvaluator.cs (1)
51newPrincipal = MergeUserPrincipal(newPrincipal, result.Principal);
JwtBearerSample (1)
Startup.cs (1)
52if (authResult.Succeeded && authResult.Principal.Identity.IsAuthenticated)
Microsoft.AspNetCore.Authentication (3)
AuthenticationFeatures.cs (1)
28_user = _result?.Principal;
AuthenticationMiddleware.cs (2)
63if (result?.Principal != null) 65context.User = result.Principal;
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticateResult.cs (1)
24[MemberNotNullWhen(true, nameof(Ticket), nameof(Principal), nameof(Properties))]
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
82var principal = result.Principal!;
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
161var principal = (await Context.AuthenticateAsync(Options.SignOutScheme))?.Principal;
Microsoft.AspNetCore.Authentication.Test (6)
AuthenticationMiddlewareTests.cs (3)
80Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal); 123Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal); 149Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal);
GoogleTests.cs (3)
1177await res.DescribeAsync(result.Principal); 1182await res.DescribeAsync(result?.Principal); 1187await res.DescribeAsync(result?.Principal);
Microsoft.AspNetCore.Authorization.Policy (2)
AuthenticationFeatures.cs (1)
29_user = _result?.Principal;
PolicyEvaluator.cs (1)
45newPrincipal = SecurityHelper.MergeUserPrincipal(newPrincipal, result.Principal);
Microsoft.AspNetCore.Authorization.Test (7)
AuthorizationMiddlewareTests.cs (4)
788Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal); 851Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal); 875Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal); 901Assert.Same(context.User, authenticateResultFeature.AuthenticateResult.Principal);
PolicyEvaluatorTests.cs (3)
45Assert.Equal(3, result.Principal.Identities.Count()); 64Assert.Single(result.Principal.Identities); 65Assert.Equal(auth.Principal, result.Principal);
Microsoft.AspNetCore.Identity (11)
SignInManager.cs (11)
167var authenticationMethod = auth?.Principal?.FindFirst(ClaimTypes.AuthenticationMethod); 168var amr = auth?.Principal?.FindFirst("amr"); 440return (result?.Principal != null && result.Principal.FindFirstValue(ClaimTypes.Name) == userId); 691if (auth?.Principal == null || items == null || !items.TryGetValue(LoginProviderKey, out var provider)) 705var providerKey = auth.Principal.FindFirstValue(ClaimTypes.NameIdentifier) ?? auth.Principal.FindFirstValue("sub"); 713return new ExternalLoginInfo(auth.Principal, provider, providerKey, providerDisplayName) 867if (result?.Principal == null) 872var userId = result.Principal.FindFirstValue(ClaimTypes.Name); 887LoginProvider = result.Principal.FindFirstValue(ClaimTypes.AuthenticationMethod),
Microsoft.AspNetCore.Identity.InMemory.Test (2)
FunctionalTest.cs (2)
410if (result != null && result.Principal != null) 412xml.Add(result.Principal.Claims.Select(claim => new XElement("claim", new XAttribute("type", claim.Type), new XAttribute("value", claim.Value))));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
AuthenticationTests.cs (3)
393Assert.NotNull(authenticateResult.Principal); 394Assert.NotNull(authenticateResult.Principal.Identity); 395Assert.True(authenticateResult.Principal.Identity.IsAuthenticated);
OpenIdConnectSample (1)
Startup.cs (1)
210var user = userResult.Principal;
SocialSample (1)
Startup.cs (1)
284var user = userResult.Principal;