Skip to content

Commit 5ee8c42

Browse files
hyacinthusaldas
authored andcommitted
Update key-auth.md
update for this pr: labstack/echo#1847
1 parent 11193a4 commit 5ee8c42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

website/content/middleware/key-auth.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ KeyAuthConfig struct {
4747
// Possible values:
4848
// - "header:<name>"
4949
// - "query:<name>"
50-
KeyLookup string `json:"key_lookup"`
50+
// - "form:<name>"
51+
KeyLookup string `yaml:"key_lookup"`
5152

5253
// AuthScheme to be used in the Authorization header.
5354
// Optional. Default value "Bearer".
@@ -56,6 +57,10 @@ KeyAuthConfig struct {
5657
// Validator is a function to validate key.
5758
// Required.
5859
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
5964
}
6065
```
6166

0 commit comments

Comments
 (0)