Automatic merge from release/2.0.0 -> release/2.1.0

* commit 'b452cceb2c7104629bbd048e786aecb3b72f1818':
  修正:region刚启动未获得token时,验证API请求报500错误
This commit is contained in:
李泽玺
2018-09-01 10:57:31 +08:00
+3
View File
@@ -123,6 +123,9 @@ func newAuthManager(cli *mcclient.Client, info *AuthInfo) *authManager {
}
func (a *authManager) verify(token string) (mcclient.TokenCredential, error) {
if a.adminCredential == nil {
return nil, fmt.Errorf("No valid admin token credential")
}
cred, err := a.tokenCacheVerify.Verify(a.client, a.adminCredential.GetTokenString(), token)
if err != nil {
return nil, err