{"id":23451286,"url":"https://github.com/nlog/nlog.windowsidentity","last_synced_at":"2025-04-13T20:34:42.830Z","repository":{"id":66163506,"uuid":"500067670","full_name":"NLog/NLog.WindowsIdentity","owner":"NLog","description":"NLog extensions for displaying User Windows Identity and target wrapper for user impersonation","archived":false,"fork":false,"pushed_at":"2024-04-07T21:26:42.000Z","size":41,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-06T17:49:16.502Z","etag":null,"topics":["authentication","csharp","dotnet","identity","nlog","nlog-target"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NLog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-06-05T10:38:49.000Z","updated_at":"2023-12-28T17:37:47.000Z","dependencies_parsed_at":"2023-11-17T20:29:32.906Z","dependency_job_id":"c052b7c2-e8d9-4ab6-8b19-c04fb8e2b935","html_url":"https://github.com/NLog/NLog.WindowsIdentity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLog%2FNLog.WindowsIdentity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLog%2FNLog.WindowsIdentity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLog%2FNLog.WindowsIdentity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NLog%2FNLog.WindowsIdentity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NLog","download_url":"https://codeload.github.com/NLog/NLog.WindowsIdentity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231033415,"owners_count":18317974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","csharp","dotnet","identity","nlog","nlog-target"],"created_at":"2024-12-24T00:25:35.515Z","updated_at":"2024-12-24T00:25:35.998Z","avatar_url":"https://github.com/NLog.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NLog.WindowsIdentity\nNLog 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)\n\n[![Version](https://badge.fury.io/nu/NLog.WindowsIdentity.svg)](https://www.nuget.org/packages/NLog.WindowsIdentity)\n[![AppVeyor](https://img.shields.io/appveyor/ci/nlog/NLog-WindowsIdentity/master.svg)](https://ci.appveyor.com/project/nlog/NLog-WindowsIdentity/branch/master)\n\n\n### How to install\n\n1) Install the package\n\n    `Install-Package NLog.WindowsIdentity` or in your csproj:\n\n    ```xml\n    \u003cPackageReference Include=\"NLog.WindowsIdentity\" Version=\"5.*\" /\u003e\n    ```\n\n2) Add to your nlog.config:\n\n    ```xml\n    \u003cextensions\u003e\n        \u003cadd assembly=\"NLog.WindowsIdentity\"/\u003e\n    \u003c/extensions\u003e\n    ```\n\n   Alternative register from code using [fluent configuration API](https://github.com/NLog/NLog/wiki/Fluent-Configuration-API):\n\n    ```csharp\n    LogManager.Setup().SetupExtensions(ext =\u003e {\n        ext.RegisterTarget\u003cNLog.Targets.Wrappers.ImpersonatingTargetWrapper\u003e();\n        ext.RegisterLayoutRenderer\u003cNLog.LayoutRenderers.WindowsIdentityLayoutRenderer\u003e();\n    });\n    ```\n\n### Example of Windows Identity UserName\nExample of `NLog.config`-file that outputs username from [Windows Identity](https://github.com/NLog/NLog/wiki/Windows-Identity-Layout-Renderer) :\n\n```xml\n\u003cnlog\u003e\n    \u003cextensions\u003e\n        \u003cadd assembly=\"NLog.WindowsIdentity\"/\u003e\n    \u003c/extensions\u003e\n    \u003ctargets\u003e\n        \u003ctarget name=\"console\" xsi:type=\"console\" layout=\"${message}|User=${windows-identity}\" /\u003e\n    \u003c/targets\u003e\n    \u003crules\u003e\n        \u003clogger minLevel=\"Info\" writeTo=\"console\" /\u003e\n    \u003c/rules\u003e\n\u003c/nlog\u003e\n```\n\n### Example of Impersonating Windows Identity\nExample of `NLog.config`-file that apply [ImpersonatingWrapper](https://github.com/NLog/NLog/wiki/ImpersonatingWrapper-target) :\n\n```xml\n\u003cnlog\u003e\n    \u003cextensions\u003e\n        \u003cadd assembly=\"NLog.WindowsIdentity\"/\u003e\n    \u003c/extensions\u003e\n    \u003ctargets\u003e\n        \u003ctarget name=\"userConsole\" xsi:type=\"ImpersonatingWrapper\" userName=\"xxx\"\u003e\n            \u003ctarget name=\"console\" xsi:type=\"console\" layout=\"${message}|User=${windows-identity}\" /\u003e\n        \u003c/target\u003e\n    \u003c/targets\u003e\n    \u003crules\u003e\n        \u003clogger minLevel=\"Info\" writeTo=\"userConsole\" /\u003e\n    \u003c/rules\u003e\n\u003c/nlog\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlog%2Fnlog.windowsidentity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlog%2Fnlog.windowsidentity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlog%2Fnlog.windowsidentity/lists"}