Do not attempt to generate URLToken for anonymous downloads (#5078)

This is a regression since last release - fixes #5076
This commit is contained in:
Harshavardhana
2017-10-17 22:44:27 -07:00
committed by Nitish Tiwari
parent 75865efb0e
commit f25bec6bf1
3 changed files with 58 additions and 45 deletions

View File

@@ -93,6 +93,9 @@ func keyFuncCallback(jwtToken *jwtgo.Token) (interface{}, error) {
}
func isAuthTokenValid(tokenString string) bool {
if tokenString == "" {
return false
}
var claims jwtgo.StandardClaims
jwtToken, err := jwtgo.ParseWithClaims(tokenString, &claims, keyFuncCallback)
if err != nil {