Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,30 @@ jobs:
}
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

- name: Extract version and create tag
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
shell: pwsh
run: |
# Extract version from csproj
[xml]$csproj = Get-Content src/AdysTech.CredentialManager/AdysTech.CredentialManager.csproj
$version = $csproj.Project.PropertyGroup.Version | Select-Object -First 1
$tagName = "v$version"

Write-Host "Package version: $version"
Write-Host "Tag name: $tagName"

# Check if tag already exists
git fetch --tags
$tagExists = git tag -l $tagName

if ($tagExists) {
Write-Host "Tag $tagName already exists, skipping tag creation"
} else {
Write-Host "Creating new tag: $tagName"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a $tagName -m "Release $version"
git push origin $tagName
Write-Host "Tag $tagName created and pushed"
}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![NuGet](https://img.shields.io/nuget/v/AdysTech.CredentialManager)](https://www.nuget.org/packages/AdysTech.CredentialManager)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Build and Deploy](https://github.com/AdysTech/CredentialManager/actions/workflows/build.yml/badge.svg)](https://github.com/AdysTech/CredentialManager/actions/workflows/build.yml)

A .NET library for storing and retrieving credentials from the Windows Credential Store.
Wraps the native `CredWrite`, `CredRead`, `CredEnumerate`, and `CredDelete` APIs via P/Invoke,
Expand Down Expand Up @@ -278,3 +279,12 @@ The project requires Windows for testing (credential store access via interactiv
## License

[MIT](LICENSE) — Copyright (c) 2016-2026 Adys Tech

## Historical context
C# wrapper around CredWrite / CredRead functions to store and retrieve from Windows Credential Store.
Windows OS comes equipped with a very secure robust [Credential Manager](https://technet.microsoft.com/en-us/library/jj554668.aspx) from Windows XP onwards, and [good set of APIs](https://msdn.microsoft.com/en-us/library/windows/desktop/aa374731(v=vs.85).aspx#credentials_management_functions) to interact with it. However .NET Framework did not provide any standard way to interact with this vault.

Microsoft Peer Channel blog (WCF team) has written [a blog post](https://docs.microsoft.com/en-us/archive/blogs/peerchan/application-password-security) in 2005 which provided basic structure of using the Win32 APIs for credential management in .NET.
I used their code, and improved up on it to add `PromptForCredentials` function to display a dialog to get the credentials from user.

I left the project stale for few years, and an amazing contributor @shakeyourbunny helped me to modernize the framework and fix few security audit findings. Huge thanks!