private void DeleteDefaultCreds()
 {
     credStore.DeletePassword(credentialId);
     credStore.DeletePassword(otherCredId);
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
     {
         string credsFolder = ((LinuxCredentialStore)credStore).CredentialFolderPath;
         if (Directory.Exists(credsFolder))
         {
             Directory.Delete(credsFolder, true);
         }
     }
 }
 private async Task <bool> DeletePasswordAsync(Credential credential)
 {
     return(await Task.Factory.StartNew(() =>
     {
         Credential.ValidateForLookup(credential);
         return credStore.DeletePassword(credential.CredentialId);
     }));
 }
Ejemplo n.º 3
0
        public async Task HandleDeleteCredentialRequest(Credential credential, RequestContext <bool> requestContext)
        {
            Func <bool> doDelete = () =>
            {
                Credential.ValidateForLookup(credential);
                return(credStore.DeletePassword(credential.CredentialId));
            };

            await HandleRequest(doDelete, requestContext, "HandleDeleteCredentialRequest");
        }