feat(auth): Add api key authentication to config and add validation with argon2
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user