Skip to content

Commit 6f0bad2

Browse files
committed
Code Quality: Add support for removing credentials
1 parent 95163cc commit 6f0bad2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Files.App/Helpers/CredentialsHelpers.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ public static void SavePassword(string resourceName, string username, string pas
1313
vault.Add(credential);
1414
}
1515

16+
public static void DeleteSavedPassword(string resourceName, string username)
17+
{
18+
var vault = new PasswordVault();
19+
var credential = vault.Retrieve(resourceName, username);
20+
21+
vault.Remove(credential);
22+
}
23+
1624
public static string GetPassword(string resourceName, string username)
1725
{
1826
try

0 commit comments

Comments
 (0)