Esempio n. 1
0
 /// <summary>
 /// Removes the user._id's credential from the Credential Store.
 /// </summary>
 /// <param name="userId">User identifier.</param>
 /// <param name="ssoGroupKey">SSO Group Key.</param>
 public void RemoveCredential(string userId, string ssoGroupKey)
 {
     if (credentialStore != null)
     {
         credentialStore.Delete(userId, ssoGroupKey);
     }
 }
        public void TestDelete()
        {
            //Arrange
            inMemoryCredentialStore.Store(userId, ssoGroupKey, credential);

            //Act
            inMemoryCredentialStore.Delete(userId, ssoGroupKey);
            var existingCredential = inMemoryCredentialStore.Load(userId, ssoGroupKey);

            //Assert
            Assert.IsNull(existingCredential);
        }
        public override string Run(Spi.Input.Options options)
        {
            var credentials = new Security.Common.Credentials(options);

            Logger.LogDebug($"Attempting to delete {credentials}");

            var result = Task.Run(() => _credentialStore.Delete(credentials)).Result;

            if (result)
            {
                return("true");
            }

            return("false");
        }