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: xml/System.Security.Claims/ClaimsPrincipal.xml
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,7 @@
72
72
## Examples
73
73
The following example extracts the claims presented by a user in an HTTP request and writes them to the HTTP response. The current user is read from the <xref:System.Web.HttpContext> as a <xref:System.Security.Claims.ClaimsPrincipal>. The claims are then read from it and then are written to the response.
74
74
75
-
```
76
-
75
+
```csharp
77
76
ClaimsPrincipal principal = HttpContext.Current.User as ClaimsPrincipal;
0 commit comments