1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-17 00:17:36 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2017-05-27 03:10:51 -07:00
parent 3359eae306
commit 466d509e34
4 changed files with 9 additions and 9 deletions

View File

@ -15,8 +15,8 @@ func TestKeyAuth(t *testing.T) {
res := httptest.NewRecorder()
c := e.NewContext(req, res)
config := KeyAuthConfig{
Validator: func(key string, c echo.Context) (error, bool) {
return nil, key == "valid-key"
Validator: func(key string, c echo.Context) (bool, error) {
return key == "valid-key", nil
},
}
h := KeyAuthWithConfig(config)(func(c echo.Context) error {