mirror of
https://github.com/labstack/echo.git
synced 2025-06-17 00:17:36 +02:00
Key auth validator now accepts context
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -15,7 +15,7 @@ func TestKeyAuth(t *testing.T) {
|
||||
res := httptest.NewRecorder()
|
||||
c := e.NewContext(req, res)
|
||||
config := KeyAuthConfig{
|
||||
Validator: func(key string) bool {
|
||||
Validator: func(key string, c echo.Context) bool {
|
||||
return key == "valid-key"
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user