1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-01 22:51:17 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-12-19 11:37:43 -08:00
parent 23176c639e
commit f5f75122ba
3 changed files with 8 additions and 8 deletions

View File

@@ -14,8 +14,8 @@ import (
type (
// JWTConfig defines the config for JWT middleware.
JWTConfig struct {
// AuthScheme to define custom bearer variable in the Authorization header.
// Optional. Default value "Bearer"
// AuthScheme to be used in the Authorization header.
// Optional. Default value "Bearer".
AuthScheme string
// Skipper defines a function to skip middleware.
@@ -52,10 +52,6 @@ type (
jwtExtractor func(echo.Context) (string, error)
)
const (
bearer = "Bearer"
)
// Algorithms
const (
AlgorithmHS256 = "HS256"
@@ -64,7 +60,7 @@ const (
var (
// DefaultJWTConfig is the default JWT auth middleware config.
DefaultJWTConfig = JWTConfig{
AuthScheme: bearer,
AuthScheme: "Bearer",
Skipper: defaultSkipper,
SigningMethod: AlgorithmHS256,
ContextKey: "user",