auth: reject empty signing method for JWT token provider

release-3.3
Anthony Romano 2017-06-07 16:44:20 -07:00
parent 29911195de
commit fe727f3106
1 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,9 @@ func prepareOpts(opts map[string]string) (jwtSignMethod, jwtPubKeyPath, jwtPrivK
return "", "", "", ErrInvalidAuthOpts
}
}
if len(jwtSignMethod) == 0 {
return "", "", "", ErrInvalidAuthOpts
}
return jwtSignMethod, jwtPubKeyPath, jwtPrivKeyPath, nil
}