You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/migration/fx-to-core/areas/claimsprincipal-current.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The current ClaimsPrincipal is a fundamental component of authenticated web appl
13
13
14
14
## Why static ClaimsPrincipal migration is complex
15
15
16
-
ASP.NET Framework and ASP.NET Core have fundamentally different approaches to accessing the current user:
16
+
ASP.NET Framework and ASP.NET Core take fundamentally different approaches to how the current user is accessed:
17
17
18
18
***ASP.NET Framework** uses static properties like <xref:System.Security.Claims.ClaimsPrincipal.Current?displayProperty=nameWithType> and <xref:System.Threading.Thread.CurrentPrincipal?displayProperty=nameWithType> with automatic context management. These properties are interchangeable and both provide access to the current user's identity.
19
19
***ASP.NET Core** stores the current user in <xref:Microsoft.AspNetCore.Http.HttpContext.User?displayProperty=nameWithType> and avoids static state.
0 commit comments