Add RemoveFingerprintCommand

This commit is contained in:
2021-06-04 23:26:22 +02:00
parent 90afa7fe3b
commit 5e303c39f2
4 changed files with 45 additions and 0 deletions

View File

@@ -53,6 +53,22 @@ namespace Akari.Prototype.Server.Services
}
}
private void SaveFingerprints()
{
var path = _akariPath.GetPath(FingerprintsPath);
File.WriteAllText(path, JsonSerializer.Serialize(_fingerprintsHash));
}
public bool Remove(string name)
{
var result = _fingerprintsHash.Remove(name);
SaveFingerprints();
return result;
}
public void VerifyFingerprint(string name, string token)
{
_logger.LogDebug($"Verifying hash for {name}");