Skip to content

detunized/password-manager-access

Repository files navigation

Password Manager Access for .NET in C#

.NET build, test and release NuGet Badge

Password Manager Access provides read only access API to various online password managers. This unified library is a successor to a bunch of independent libraries written in the past, such as lastpass-sharp, 1password-sharp and dashlane-sharp

The following services are supported by this library:

Additionally the library provides support for parsing and decryption of the offline OpVault vault format.

All services support basic log in, retrieve, decrypt, log out sequence. Though the modules providing support for different services are quite similar, they do not provide a unified interface. That is mainly due to the differences in the API and the data provided by the services themselves.

A typical work flow with simple password authentication looks like this:

var vault = Vault.Open("username",
                       "password",
                       new ClientInfo(Platform.Desktop,
                                      "device-id",
                                      "client-description"),
                       null);

foreach (var a in vault.Accounts)
    Console.WriteLine($"{a.Name}: {a.Username} {a.Password} {a.Url}");

This code snippet downloads and decrypts a LastPass vault and prints all the accounts to the standard output. For the fully working example please refer to the examples folder in this repo.

License

The library is released under the MIT license. See LICENSE for details.