allow again the push

This commit is contained in:
Paul Schneider 2026-07-05 21:44:49 +01:00
commit a78847dbc9
5 changed files with 94 additions and 7 deletions

View file

@ -58,11 +58,21 @@ namespace isnd.host.tests
const string clearValue = "legacy-api-key";
var legacyProtectedValue = new Isn.DefaultDataProtector().Protect(clearValue);
var unprotected = ApiKeyProtector.UnprotectWithFallback(new ThrowingProtector(), legacyProtectedValue);
var unprotected = ApiKeyProtector.TryUnprotectKey(new ThrowingProtector(), legacyProtectedValue);
Assert.Equal(clearValue, unprotected);
}
[Fact]
public void ApiKeyProtectorReturnsRawValueWhenInputIsNotProtected()
{
const string rawApiKey = "CfDJ8AstXUEkxpJBrmoENwy__WNPxqcOwAuxyYgiU3Mebns5yxAT3VrC5vTuWTRSGZBFB7IGUyFkUYsp2nhRy64NqeUzLgOwEcU4FPOf-yaAtPeTMeStRd60bRh2ZYyQkQ3hrhW-lwpCLwYtNOnOyX2jayuzByF-4QfHIEhg6lbWenzf";
var result = ApiKeyProtector.TryUnprotectKey(new ThrowingProtector(), rawApiKey);
Assert.Equal(rawApiKey, result);
}
[Fact]
void TestDropUser()
{