feat(auth): Add api key authentication to config and add validation with argon2

This commit is contained in:
Björn Benouarets
2026-02-09 07:39:44 +01:00
parent 78da787f43
commit 9f3177bf5b
6 changed files with 166 additions and 33 deletions

View File

@@ -10,12 +10,14 @@ type Configuration struct {
Targets []Target `yaml:"targets"`
Apis []Api `yaml:"apis"`
Routes []Route `yaml:"routes"`
Debug bool `yaml:"debug"`
}
type Gateway struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Features []string `yaml:"features"`
Debug bool `yaml:"debug"`
}
type Host struct {
@@ -60,6 +62,12 @@ type Auth struct {
Type string `yaml:"type"`
Header string `yaml:"header"`
Path AuthPath `yaml:"path"`
Keys []ApiKey `yaml:"keys"`
}
type ApiKey struct {
ID string `yaml:"id"`
Key string `yaml:"key"`
}
type AuthPath struct {