Merge pull request #130 from ChenHaoHu/master
bugfix: fix auth check return error msg
This commit is contained in:
commit
d5e6d31d8a
@ -608,7 +608,7 @@ func (mw *GinJWTMiddleware) jwtFromHeader(c *gin.Context, key string) (string, e
|
|||||||
|
|
||||||
parts := strings.SplitN(authHeader, " ", 2)
|
parts := strings.SplitN(authHeader, " ", 2)
|
||||||
if !(len(parts) == 2 && parts[0] == mw.TokenHeadName) {
|
if !(len(parts) == 2 && parts[0] == mw.TokenHeadName) {
|
||||||
return "", ErrInvalidAuthHeader
|
return "-", ErrInvalidAuthHeader
|
||||||
}
|
}
|
||||||
|
|
||||||
return parts[1], nil
|
return parts[1], nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user