summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/labstack/echo/middleware/jwt.go
diff options
context:
space:
mode:
authorDuco van Amstel <helcaraxan@gmail.com>2018-11-18 17:55:05 +0000
committerWim <wim@42.be>2018-11-25 21:21:04 +0100
commit09875fe1603307080f3a4172985c5dca3bd9912d (patch)
treea23220772f6f6597d509ca71b2df3480a77b8076 /vendor/github.com/labstack/echo/middleware/jwt.go
parentf716b8fc0ff90f47b61e218ef34019b38bd70e0d (diff)
downloadmatterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.gz
matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.bz2
matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.zip
Update direct dependencies where possible
Diffstat (limited to 'vendor/github.com/labstack/echo/middleware/jwt.go')
-rw-r--r--vendor/github.com/labstack/echo/middleware/jwt.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/labstack/echo/middleware/jwt.go b/vendor/github.com/labstack/echo/middleware/jwt.go
index 47d885b0..e98040ae 100644
--- a/vendor/github.com/labstack/echo/middleware/jwt.go
+++ b/vendor/github.com/labstack/echo/middleware/jwt.go
@@ -58,8 +58,8 @@ const (
// Errors
var (
- ErrJWTMissing = echo.NewHTTPError(http.StatusBadRequest, "Missing or malformed jwt")
- ErrJWTInvalid = echo.NewHTTPError(http.StatusUnauthorized, "Invalid or expired jwt")
+ ErrJWTMissing = echo.NewHTTPError(http.StatusBadRequest, "missing or malformed jwt")
+ ErrJWTInvalid = echo.NewHTTPError(http.StatusUnauthorized, "invalid or expired jwt")
)
var (
@@ -116,7 +116,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
config.keyFunc = func(t *jwt.Token) (interface{}, error) {
// Check the signing method
if t.Method.Alg() != config.SigningMethod {
- return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"])
+ return nil, fmt.Errorf("unexpected jwt signing method=%v", t.Header["alg"])
}
return config.SigningKey, nil
}
@@ -156,9 +156,9 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
return next(c)
}
return &echo.HTTPError{
- Code: ErrJWTInvalid.Code,
- Message: ErrJWTInvalid.Message,
- Inner: err,
+ Code: ErrJWTInvalid.Code,
+ Message: ErrJWTInvalid.Message,
+ Internal: err,
}
}
}