1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

Codechange: create helper class for useful NetworkAuthorizedKeys functions

This commit is contained in:
Rubidium
2024-03-18 18:56:46 +01:00
committed by rubidium42
parent 2485de9462
commit 7580eac2d5
7 changed files with 81 additions and 38 deletions

View File

@@ -423,14 +423,6 @@ void CombinedAuthenticationServerHandler::Add(CombinedAuthenticationServerHandle
this->SendResponse();
}
/* virtual */ bool NetworkAuthenticationDefaultAuthorizedKeyHandler::IsAllowed(std::string_view peer_public_key) const
{
for (const auto &allowed : *this->authorized_keys) {
if (StrEqualsIgnoreCase(allowed, peer_public_key)) return true;
}
return false;
}
/**
* Create a NetworkAuthenticationClientHandler.