mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.0.0 -> release/2.1.0
* commit 'b452cceb2c7104629bbd048e786aecb3b72f1818': 修正:region刚启动未获得token时,验证API请求报500错误
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user