Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nlog/nlog.windowsidentity

NLog extensions for displaying User Windows Identity and target wrapper for user impersonation
https://github.com/nlog/nlog.windowsidentity

authentication csharp dotnet identity nlog nlog-target

Last synced: 10 days ago
JSON representation

NLog extensions for displaying User Windows Identity and target wrapper for user impersonation

Awesome Lists containing this project

README

        

# NLog.WindowsIdentity
NLog extensions for displaying [User Windows Identity](https://github.com/NLog/NLog/wiki/Windows-Identity-Layout-Renderer) and [target wrapper for user impersonation](https://github.com/NLog/NLog/wiki/ImpersonatingWrapper-target)

[![Version](https://badge.fury.io/nu/NLog.WindowsIdentity.svg)](https://www.nuget.org/packages/NLog.WindowsIdentity)
[![AppVeyor](https://img.shields.io/appveyor/ci/nlog/NLog-WindowsIdentity/master.svg)](https://ci.appveyor.com/project/nlog/NLog-WindowsIdentity/branch/master)

### How to install

1) Install the package

`Install-Package NLog.WindowsIdentity` or in your csproj:

```xml

```

2) Add to your nlog.config:

```xml



```

Alternative register from code using [fluent configuration API](https://github.com/NLog/NLog/wiki/Fluent-Configuration-API):

```csharp
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterTarget();
ext.RegisterLayoutRenderer();
});
```

### Example of Windows Identity UserName
Example of `NLog.config`-file that outputs username from [Windows Identity](https://github.com/NLog/NLog/wiki/Windows-Identity-Layout-Renderer) :

```xml









```

### Example of Impersonating Windows Identity
Example of `NLog.config`-file that apply [ImpersonatingWrapper](https://github.com/NLog/NLog/wiki/ImpersonatingWrapper-target) :

```xml











```