We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11193a4 commit 5ee8c42Copy full SHA for 5ee8c42
website/content/middleware/key-auth.md
@@ -47,7 +47,8 @@ KeyAuthConfig struct {
47
// Possible values:
48
// - "header:<name>"
49
// - "query:<name>"
50
- KeyLookup string `json:"key_lookup"`
+ // - "form:<name>"
51
+ KeyLookup string `yaml:"key_lookup"`
52
53
// AuthScheme to be used in the Authorization header.
54
// Optional. Default value "Bearer".
@@ -56,6 +57,10 @@ KeyAuthConfig struct {
56
57
// Validator is a function to validate key.
58
// Required.
59
Validator KeyAuthValidator
60
+
61
+ // ErrorHandler defines a function which is executed for an invalid key.
62
+ // It may be used to define a custom error.
63
+ ErrorHandler KeyAuthErrorHandler
64
}
65
```
66
0 commit comments