Skip to content

Commit

Permalink
added right amount of return
Browse files Browse the repository at this point in the history
  • Loading branch information
vongohren committed Dec 20, 2015
1 parent 5d11392 commit 1f970af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 1f970af

Please sign in to comment.