2 types derived from ClaimsPrincipal
System.Security.Claims (1)
System.Security.Principal.Windows (1)
56 instantiations of ClaimsPrincipal
Aspire.Dashboard (9)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (1)
Microsoft.AspNetCore.Authentication (2)
Microsoft.AspNetCore.Authentication.Abstractions (1)
Microsoft.AspNetCore.Authentication.Certificate (1)
Microsoft.AspNetCore.Authentication.Cookies (3)
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.Twitter (1)
Microsoft.AspNetCore.Authentication.WsFederation (1)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Policy (2)
Microsoft.AspNetCore.Components.Server (2)
Microsoft.AspNetCore.Components.WebAssembly.Authentication (5)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.SignalR.Core (4)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.Extensions.Identity.Core (1)
System.Security.Claims (2)
458 references to ClaimsPrincipal
Aspire.Dashboard (7)
Aspire.Dashboard.Tests (1)
dotnet-svcutil-lib (1)
Microsoft.AspNetCore.Antiforgery (4)
Microsoft.AspNetCore.Authentication (20)
Microsoft.AspNetCore.Authentication.Abstractions (23)
Microsoft.AspNetCore.Authentication.BearerToken (7)
Microsoft.AspNetCore.Authentication.Certificate (6)
Microsoft.AspNetCore.Authentication.Cookies (11)
Microsoft.AspNetCore.Authentication.Core (9)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OAuth (2)
Microsoft.AspNetCore.Authentication.OpenIdConnect (14)
OpenIdConnectHandler.cs (11)
170var principal = (await Context.AuthenticateAsync(Options.SignOutScheme))?.Principal;
765ClaimsPrincipal? user = null;
853ClaimsPrincipal tokenEndpointUser;
1048ClaimsPrincipal principal, AuthenticationProperties properties)
1116/// Save the tokens contained in the <see cref="OpenIdConnectMessage"/> in the <see cref="ClaimsPrincipal"/>.
1239private async Task<TokenValidatedContext> RunTokenValidatedEventAsync(OpenIdConnectMessage authorizationResponse, OpenIdConnectMessage? tokenEndpointResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt, string? nonce)
1265private async Task<AuthorizationCodeReceivedContext> RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal? user, AuthenticationProperties properties, JwtSecurityToken? jwt)
1314ClaimsPrincipal user,
1340private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(ClaimsPrincipal principal, AuthenticationProperties properties, OpenIdConnectMessage message, JsonDocument user)
1391private ClaimsPrincipal ValidateToken(string idToken, AuthenticationProperties properties, TokenValidationParameters validationParameters, out JwtSecurityToken jwt)
1411var principal = Options.SecurityTokenValidator.ValidateToken(idToken, validationParameters, out SecurityToken validatedToken);
Microsoft.AspNetCore.Authentication.Twitter (2)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (28)
AuthorizationServiceExtensions.cs (4)
27public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement)
46public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy)
64public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy)
82public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
Microsoft.AspNetCore.Authorization.Policy (13)
Microsoft.AspNetCore.Components.Authorization (6)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (12)
Microsoft.AspNetCore.Components.WebAssembly.Authentication (16)
Microsoft.AspNetCore.Connections.Abstractions (2)
Microsoft.AspNetCore.Http (3)
Microsoft.AspNetCore.Http.Abstractions (6)
Microsoft.AspNetCore.Http.Connections (34)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Http.Features (2)
Microsoft.AspNetCore.Http.Results (14)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (3)
105private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string?, global::System.Security.Claims.ClaimsPrincipal, global::System.Exception?> __SignInResultExecutingCallback =
106global::Microsoft.Extensions.Logging.LoggerMessage.Define<string?, global::System.Security.Claims.ClaimsPrincipal>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(1, "SignInResultExecuting"), "Executing SignInResult with authentication scheme ({Scheme}) and the following principal: {Principal}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
113public static partial void SignInResultExecuting(global::Microsoft.Extensions.Logging.ILogger logger, string? scheme, global::System.Security.Claims.ClaimsPrincipal principal)
Microsoft.AspNetCore.Identity (85)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\GeneratedRouteBuilderExtensions.g.cs (48)
1306var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.ContentHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
1323var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!);
1334var claimsPrincipal_local = httpContext.User;
1355var claimsPrincipal_local = httpContext.User;
1363var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, sp_local));
1374var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.ContentHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
1410var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.PasskeyRegistrationRequest arg1, global::System.IServiceProvider arg2) => throw null!);
1428var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.PasskeyRegistrationRequest>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!);
1439var claimsPrincipal_local = httpContext.User;
1467var claimsPrincipal_local = httpContext.User;
1482var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::Microsoft.AspNetCore.Identity.Data.PasskeyRegistrationRequest, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, registration_local!, sp_local));
1493var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.PasskeyRegistrationRequest arg1, global::System.IServiceProvider arg2) => throw null!);
1527var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse[]>, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
1544var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!);
1555var claimsPrincipal_local = httpContext.User;
1576var claimsPrincipal_local = httpContext.User;
1584var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, sp_local));
1595var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse[]>, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
1632var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.String arg1, global::Microsoft.AspNetCore.Identity.Data.PasskeyUpdateRequest arg2, global::System.IServiceProvider arg3) => throw null!);
1651var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.String>(1)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.PasskeyUpdateRequest>(2)!, ic.GetArgument<global::System.IServiceProvider>(3)!);
1662var claimsPrincipal_local = httpContext.User;
1699var claimsPrincipal_local = httpContext.User;
1723var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::System.String, global::Microsoft.AspNetCore.Identity.Data.PasskeyUpdateRequest, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, credentialId_local!, request_local!, sp_local));
1734var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.PasskeyInfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.String arg1, global::Microsoft.AspNetCore.Identity.Data.PasskeyUpdateRequest arg2, global::System.IServiceProvider arg3) => throw null!);
1769var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.String arg1, global::System.IServiceProvider arg2) => throw null!);
1787var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.String>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!);
1798var claimsPrincipal_local = httpContext.User;
1828var claimsPrincipal_local = httpContext.User;
1845var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::System.String, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, credentialId_local!, sp_local));
1856var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.String arg1, global::System.IServiceProvider arg2) => throw null!);
1892var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!);
1910var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!);
1921var claimsPrincipal_local = httpContext.User;
1949var claimsPrincipal_local = httpContext.User;
1964var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, tfaRequest_local!, sp_local));
1975var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!);
2009var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
2026var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!);
2037var claimsPrincipal_local = httpContext.User;
2058var claimsPrincipal_local = httpContext.User;
2066var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, sp_local));
2077var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!);
2114var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.InfoRequest arg1, global::Microsoft.AspNetCore.Http.HttpContext arg2, global::System.IServiceProvider arg3) => throw null!);
2132var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>(1)!, ic.GetArgument<global::Microsoft.AspNetCore.Http.HttpContext>(2)!, ic.GetArgument<global::System.IServiceProvider>(3)!);
2143var claimsPrincipal_local = httpContext.User;
2172var claimsPrincipal_local = httpContext.User;
2188var result = await filteredInvocation(EndpointFilterInvocationContext.Create<global::System.Security.Claims.ClaimsPrincipal, global::Microsoft.AspNetCore.Identity.Data.InfoRequest, global::Microsoft.AspNetCore.Http.HttpContext, global::System.IServiceProvider>(httpContext, claimsPrincipal_local, infoRequest_local!, context_local, sp_local));
2199var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.InfoRequest arg1, global::Microsoft.AspNetCore.Http.HttpContext arg2, global::System.IServiceProvider arg3) => throw null!);
IdentityApiEndpointRouteBuilderExtensions.cs (9)
195var newPrincipal = await signInManager.CreateUserPrincipalAsync(user);
331(ClaimsPrincipal claimsPrincipal, [FromServices] IServiceProvider sp) =>
356(ClaimsPrincipal claimsPrincipal, [FromBody] PasskeyRegistrationRequest registration, [FromServices] IServiceProvider sp) =>
411(ClaimsPrincipal claimsPrincipal, [FromServices] IServiceProvider sp) =>
433(ClaimsPrincipal claimsPrincipal, string credentialId, [FromBody] PasskeyUpdateRequest request, [FromServices] IServiceProvider sp) =>
472(ClaimsPrincipal claimsPrincipal, string credentialId, [FromServices] IServiceProvider sp) =>
503(ClaimsPrincipal claimsPrincipal, [FromBody] TwoFactorRequest tfaRequest, [FromServices] IServiceProvider sp) =>
579(ClaimsPrincipal claimsPrincipal, [FromServices] IServiceProvider sp) =>
591(ClaimsPrincipal claimsPrincipal, [FromBody] InfoRequest infoRequest, HttpContext context, [FromServices] IServiceProvider sp) =>
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Mvc.Core (28)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (3)
2294private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string?, global::System.Security.Claims.ClaimsPrincipal, global::System.Exception?> __SignInResultExecutingCallback =
2295global::Microsoft.Extensions.Logging.LoggerMessage.Define<string?, global::System.Security.Claims.ClaimsPrincipal>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(1, "SignInResultExecuting"), "Executing SignInResult with authentication scheme ({Scheme}) and the following principal: {Principal}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
2302public static partial void SignInResultExecuting(global::Microsoft.Extensions.Logging.ILogger logger, string? scheme, global::System.Security.Claims.ClaimsPrincipal principal)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.RazorPages (10)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (8)
Microsoft.AspNetCore.Owin (6)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.SignalR.Core (21)
Microsoft.Extensions.Identity.Core (17)
mscorlib (1)
netstandard (1)
System.Security.Claims (20)
System.ServiceModel.Primitives (1)