A .NET Standard 2.0 library that provides basic access to the Windows Credential Manager. Supported operations:
- Reading/Writing generic credentials
- Show a prompt for generic credentials
Writing generic credentials:
var credentials = new GenericCredentials ("UNIQUE_TARGET_ID");
genericCredentials.UserName = "admin";
genericCredentials.Password = password;
genericCredentials.Save();
Reading generic credentials:
var genericCredentials = new GenericCredentials ("UNIQUE_TARGET_ID");
genericCredentials.Load();
Prompting the user for credentials:
var promptResult = CredentialsPrompt.Show (
"Please enter your password",
"Password required!");
if (!promptResult.Cancelled)
{
var username = promptResult.Username;
var password = promptResult.Password;
}