Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nlog/nlog.windowsidentity
- Owner: NLog
- License: bsd-3-clause
- Created: 2022-06-05T10:38:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-07T21:26:42.000Z (9 months ago)
- Last Synced: 2024-12-06T17:49:16.502Z (28 days ago)
- Topics: authentication, csharp, dotnet, identity, nlog, nlog-target
- Language: C#
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```