mirror of https://github.com/golang-jwt/jwt.git
added right amount of return
This commit is contained in:
parent
5d11392aac
commit
1f970af1f8
2
token.go
2
token.go
|
@ -85,7 +85,7 @@ func (t *Token) SigningString() (string, error) {
|
|||
// If everything is kosher, err will be nil
|
||||
func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
|
||||
if strings.Contains(strings.ToLower(tokenString), "bearer") {
|
||||
return &ValidationError{err: "tokenstring should not contain bearer", Errors: ValidationErrorMalformed}
|
||||
return nil, &ValidationError{err: "tokenstring should not contain bearer", Errors: ValidationErrorMalformed}
|
||||
}
|
||||
return new(Parser).Parse(tokenString, keyFunc)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue