KeePassPleasantPasswordServerClient 1.0.12

There is a newer version of this package available.
See the version list below for details.
dotnet add package KeePassPleasantPasswordServerClient --version 1.0.12
                    
NuGet\Install-Package KeePassPleasantPasswordServerClient -Version 1.0.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KeePassPleasantPasswordServerClient" Version="1.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KeePassPleasantPasswordServerClient" Version="1.0.12" />
                    
Directory.Packages.props
<PackageReference Include="KeePassPleasantPasswordServerClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KeePassPleasantPasswordServerClient --version 1.0.12
                    
#r "nuget: KeePassPleasantPasswordServerClient, 1.0.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=KeePassPleasantPasswordServerClient&version=1.0.12
                    
Install as a Cake Addin
#tool nuget:?package=KeePassPleasantPasswordServerClient&version=1.0.12
                    
Install as a Cake Tool

What is it?

It is a simple package enabling You to grab basic information from a KeePass server that You or Your organisation is hosting. Data that You can get is a login and a password.

Ideal solution for having a centralised password storage for a single person or whole company. Store Your passwords on a server and let Your services / apps ask for them when needed.

Prerequisites

A loaded json file injected into 'IConfiguraion' containing following data:

"KeePass": { "BaseAddress": "correct address to KeePass instannce ended with '/'", "TokenEndpoint": "OAuth2/Token", "RestEndpoint": "api/v4/rest/credential/", "Username": "KeePass username", "Password": "KeePass password" }

If there is no loaded json file - those settings can be injected when setting up a Dependency Injection.

Dependency injection setup

Example uses Microsoft NET 5.0 DI container.

This project contains simplified DI installation method called SetupKeePassServices(), that takes IConfiguration as a parameter. Optionally, if you wish to replace / override settings from json file mentioned earlier, you can give it additional optional parameter KeePassSettings. Settings from this object will supersede those from json. This is the whole setup.

No Dependency injection container setup

'New up' KeePassService and in place of IHttpClientFactory insert NoDiHttpClientFactory object - this will provide KeePassService with proper HttpClient (singleton).

Usage

Inject IKeePassService into any object you want. Use async AskForSecret(string guid) method to retrieve a secret containg username / password corresponding to given guid.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 455 12/11/2021
1.0.13.2 324 12/11/2021
1.0.13.1 330 11/22/2021
1.0.13 359 11/22/2021
1.0.12 356 11/22/2021
1.0.10 348 11/22/2021
1.0.9 350 11/22/2021
1.0.8 360 11/22/2021
1.0.7 361 11/22/2021
1.0.6 364 11/22/2021
1.0.5 357 11/22/2021
1.0.4 347 11/22/2021
1.0.3 353 11/22/2021
1.0.2 349 11/22/2021
1.0.0 356 11/22/2021

Added additional class so new up of KeePass wont be problematic.
NoDiHttpClientFactory can be given as constructor param when no DI IHttpClientFactory implementation is available. Be advised, that this solution should be used only with short lived programs.