refractor(auth): removed password from everywhere
This commit is contained in:
@@ -65,7 +65,6 @@ DROGON_TEST(SqlScalarSerializationKeepsTypes)
|
||||
Json::Value value(Json::objectValue);
|
||||
value["id"] = Json::UInt64(7);
|
||||
value["banned"] = false;
|
||||
value["must_change_password"] = true;
|
||||
value["points"] = Json::Int64(42);
|
||||
value["phone"] = "380 6180216";
|
||||
return value;
|
||||
@@ -73,7 +72,6 @@ DROGON_TEST(SqlScalarSerializationKeepsTypes)
|
||||
|
||||
CHECK(json["id"].isUInt64());
|
||||
CHECK(json["banned"].isBool());
|
||||
CHECK(json["must_change_password"].isBool());
|
||||
CHECK(json["points"].isInt64());
|
||||
CHECK(json["phone"].isString());
|
||||
}
|
||||
@@ -163,18 +161,6 @@ DROGON_TEST(GeoJsonAcceptsContainedPolygon)
|
||||
CHECK(!visione::geojson::polygonInsideGeometry(candidate, container));
|
||||
}
|
||||
|
||||
DROGON_TEST(PasswordHashSupportsPbkdf2Only)
|
||||
{
|
||||
const auto hash = visione::crypto::hashPassword("CorrectHorse123!");
|
||||
CHECK(hash.rfind("pbkdf2_sha256$", 0) == 0);
|
||||
CHECK(visione::crypto::verifyPassword("CorrectHorse123!", hash));
|
||||
CHECK(!visione::crypto::verifyPassword("wrong", hash));
|
||||
|
||||
const std::string legacy =
|
||||
"sha256$local-dev-salt$CD4FF6AC8C9685D08E55AF693970F15F9BFCD4C0DC9F4D3001D202C9DB00291F";
|
||||
CHECK(!visione::crypto::verifyPassword("ChangeMe123!", legacy));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::promise<void> startedPromise;
|
||||
|
||||
Reference in New Issue
Block a user