Description
I've been having a bug using jwt middleware because it uses "github.com/dgrijalva/jwt-go" package but this package isn't maintained see issue 462 and it has been migrated to another project https://github.com/golang-jwt/jwt, in fact, it's the same project with others collaborators
Expected behaviour:
interface conversion: interface {} is *jwt.Token, equals to *jwt.Token
Actual behavior:
echo: http: panic serving 127.0.0.1:36350: interface conversion: interface {} is *jwt.Token, not *jwt.Token (types from different packages). As you can see are the same type but different package, It's because I use github.com/golang-jwt/jwt which is the recommended package by dgrijalva in his github page dgrijalva.
Code:
` config := middleware.JWTConfig{
Claims: &security.JwtCustomClaims{},
SigningKey: []byte("secret"),
ContextKey: "authenticated",
}
`
middleware.JWTConfig ( middleware/jwt) dependencies:
import ( "fmt" "net/http" "reflect" "strings" "github.com/dgrijalva/jwt-go" "github.com/labstack/echo/v4" )
This "github.com/dgrijalva/jwt-go" dependency should be changed by "github.com/golang-jwt/jwt", therefore the imports will so:
`
import (
"fmt"
"net/http"
"reflect"
"strings"
"github.com/golang-jwt/jwt"
"github.com/labstack/echo/v4"
)
`