Skip to content

Identity layout renderer

Rolf Kristensen edited this page Mar 13, 2023 · 10 revisions

Thread identity information (name and authentication information).

Platforms Supported: Limited (Not supported on NetStandard1.3+1.5)

Configuration Syntax

${identity:authType=Boolean:separator=String:name=Boolean
          :isAuthenticated=Boolean}

Parameters

Rendering Options

  • authType - Indicates whether to render Thread.CurrentPrincipal.Identity.AuthenticationType.Boolean Default: True
  • separator - Separator to be used when concatenating parts of identity information. Default: :
  • name - Indicates whether to render Thread.CurrentPrincipal.Identity.Name.Boolean Default: True
  • isAuthenticated - Indicates whether to render Thread.CurrentPrincipal.Identity.IsAuthenticated.Boolean Default: True

Notes

Note .NET Core 3

Set AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal) in the Main method of your application, otherwise this renderer could render empty unexpectedly. (Read more)

Clone this wiki locally