/// <summary> /// RemoveUserStoredCredentials method implementation /// </summary> public void RemoveUserStoredCredentials(string upn, string credentialid) { try { MFAWebAuthNUser user = RuntimeRepository.GetUser(Config, upn); if (user != null) { RuntimeRepository.RemoveUserCredential(Config, user, credentialid); } else { Log.WriteEntry(string.Format("{0}\r\n{1}", upn, "User does not exists !"), EventLogEntryType.Error, 5000); throw new ArgumentNullException(string.Format("{0}\r\n{1}", upn, "User does not exists !"));; } } catch (Exception e) { Log.WriteEntry(string.Format("{0}\r\n{1}", upn, e.Message), EventLogEntryType.Error, 5000); throw e; } }
/// <summary> /// RemoveUserStoredCredentials method implementation /// </summary> public void RemoveUserStoredCredentials(AuthenticationContext ctx, string credentialid) { MFAWebAuthNUser user = RuntimeRepository.GetUser(Config, ctx.UPN); RuntimeRepository.RemoveUserCredential(Config, user, credentialid); }