Auth check fix (#11672)

This commit is contained in:
hth 2024-01-19 15:24:18 +08:00 committed by GitHub
parent dd385294f5
commit 9722ad8dd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,6 +98,9 @@ public class AuthConfigs extends Subscriber<ServerConfigChangeEvent> {
if (StringUtils.isEmpty(nacosAuthSystemType)) {
throw new NacosException(AuthErrorCode.INVALID_TYPE.getCode(), AuthErrorCode.INVALID_TYPE.getMsg());
}
if (EnvUtil.getStandaloneMode()) {
return;
}
if (StringUtils.isEmpty(serverIdentityKey) || StringUtils.isEmpty(serverIdentityValue)) {
throw new NacosException(AuthErrorCode.EMPTY_IDENTITY.getCode(), AuthErrorCode.EMPTY_IDENTITY.getMsg());
}