疯狂的狮子Li
2023-10-25 22a8057ea4c94f7740d81093ffcabd2014e95f51
ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
@@ -10,6 +10,7 @@
import me.zhyd.oauth.model.AuthUser;
import me.zhyd.oauth.request.AuthRequest;
import me.zhyd.oauth.utils.AuthStateUtils;
import org.dromara.common.core.constant.UserConstants;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.domain.model.LoginBody;
import org.dromara.common.core.domain.model.RegisterBody;
@@ -78,6 +79,8 @@
        if (ObjectUtil.isNull(client) || !StringUtils.contains(client.getGrantType(), grantType)) {
            log.info("客户端id: {} 认证类型:{} 异常!.", clientId, grantType);
            return R.fail(MessageUtils.message("auth.grant.type.error"));
        } else if (!UserConstants.NORMAL.equals(client.getStatus())) {
            return R.fail(MessageUtils.message("auth.grant.type.stop"));
        }
        // 校验租户
        loginService.checkTenant(loginBody.getTenantId());