Skip to content

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

Configuration Syntax

${aspnet-user-claim:ClaimTypes.Name}

Parameters

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

Remarks

See also ClaimTypes-constants.

Clone this wiki locally