15 writes to Principal
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
690context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
Certificate.Sample (1)
Startup.cs (1)
28context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
Microsoft.AspNetCore.Authentication.Certificate (1)
CertificateAuthenticationHandler.cs (1)
158Principal = CreatePrincipal(clientCertificate)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
155Principal = principal
Microsoft.AspNetCore.Authentication.Negotiate (3)
NegotiateHandler.cs (3)
342Principal = user 356Principal = ldapContext.Principal 363Principal = user
Microsoft.AspNetCore.Authentication.OAuth (1)
Events\OAuthCreatingTicketContext.cs (1)
45Principal = principal;
Microsoft.AspNetCore.Authentication.Test (6)
CertificateTests.cs (4)
587context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 657context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 714context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 916context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
JwtBearerTests.cs (1)
235context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
JwtBearerTests_Handler.cs (1)
222context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterCreatingTicketContext.cs (1)
46Principal = principal;
19 references to Principal
Microsoft.AspNetCore.Authentication (2)
Events\ResultContext.cs (2)
49/// Calls success creating a ticket with the <see cref="Principal"/> and <see cref="Properties"/>. 51public void Success() => Result = HandleRequestResult.Success(new AuthenticationTicket(Principal!, Properties, Scheme.Name));
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
63return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
61return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
57return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Negotiate (3)
NegotiateHandler.cs (3)
352await LdapAdapter.RetrieveClaimsAsync(ldapContext.LdapSettings, (ldapContext.Principal.Identity as ClaimsIdentity)!, Logger); 356Principal = ldapContext.Principal 374var ticket = new AuthenticationTicket(authenticatedContext.Principal, authenticatedContext.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Negotiate.Test (1)
EventTests.cs (1)
279var identity = context.Principal.Identity;
Microsoft.AspNetCore.Authentication.OAuth (2)
Events\OAuthCreatingTicketContext.cs (1)
101public ClaimsIdentity? Identity => Principal?.Identity as ClaimsIdentity;
OAuthHandler.cs (1)
258return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Test (7)
CertificateTests.cs (3)
579Assert.NotNull(context.Principal); 651Assert.NotNull(context.Principal); 706Assert.NotNull(context.Principal);
GoogleTests.cs (1)
706context.Principal.AddIdentity(new ClaimsIdentity(new Claim[] { new Claim("RefreshToken", refreshToken, ClaimValueTypes.String, "Google") }, "Google"));
JwtBearerTests.cs (1)
493var identity = (ClaimsIdentity)context.Principal.Identity;
JwtBearerTests_Handler.cs (1)
462var identity = (ClaimsIdentity)context.Principal.Identity;
MicrosoftAccountTests.cs (1)
228context.Principal.AddIdentity(new ClaimsIdentity(new Claim[] { new Claim("RefreshToken", refreshToken, ClaimValueTypes.String, "Microsoft") }, "Microsoft"));
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
160return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);