-
Notifications
You must be signed in to change notification settings - Fork 1.4k
AspNet User Claim Layout Renderer
Rolf Kristensen edited this page Jul 19, 2022
·
3 revisions
ASP.NET User Claims authorization values.
Platforms Supported: All
Introduced with NLog.Web.AspNetCore v4.10.0, and with NLog.Web v5.1.0 for NET46
${aspnet-user-claim:ClaimTypes.Name}
ClaimType - default parameter. Key to lookup using ClaimsIdentity.FindFirst(string)
with fallback to ClaimsPrincipal.FindFirst(string)
. When value is prefixed with ClaimTypes.
(Remember dot) then it will lookup in well-known claim types from ClaimTypes-constants. For example ClaimsTypes.Name
See also ClaimTypes-constants.
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json