webapi: Implement optional API key to secure the API against unauthenticated attackers.

This commit is contained in:
Kleissner
2021-11-16 19:27:53 +01:00
parent d06c2e0b1a
commit f9d8ecb6b0
3 changed files with 43 additions and 7 deletions

View File

@@ -19,5 +19,6 @@ const (
ExitPrivateKeyCreate = 7 // Cannot create a new private key.
ExitBlockchainCorrupt = 8 // Blockchain is corrupt.
ExitGraceful = 9 // Graceful shutdown.
ExitParamApiKeyInvalid = 10 // API key parameter is invalid.
STATUS_CONTROL_C_EXIT = 0xC000013A // The application terminated as a result of a CTRL+C. This is a Windows NTSTATUS value.
)