|
@@ -1,34 +1,10 @@
|
|
|
package com.dragoninfo.dcuc.authweb.restcontroller.api.authservice.v4.controller;
|
|
|
|
|
|
-import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.dragoninfo.dcuc.auth.api.vo.*;
|
|
|
+import com.dragoninfo.dcuc.auth.api.enums.zerotrust.ZeroTrustBusinessRespEnum;
|
|
|
import com.dragoninfo.dcuc.auth.api.vo.zerotrust.*;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.api.IApiDataAuthFacade;
|
|
|
import com.dragoninfo.dcuc.auth.auth.api.IZeroTrustAuthFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.AppDataSensitiveLevelDTO;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.AppFunInfoDTO;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.DataItemsDto;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.RoleApiDto;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.data.DataAuthV2ReqDTO;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.dto.data.DataAuthV2RespDTO;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.facade.IRoleFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.facade.IServiceAuthFlowFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.facade.IStaffAssignAuthInfoFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.vo.ApiAppAuthVo;
|
|
|
-import com.dragoninfo.dcuc.auth.auth.vo.ServiceAuthenticationResVO;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.dto.AuthUserDTO;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.facade.IAuthUserInfoFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.vo.AuthUserVo;
|
|
|
-import com.dragoninfo.dcuc.auth.token.facade.IAuthTokenFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.token.vo.TokenDetailRespVo;
|
|
|
-import com.dragoninfo.dcuc.auth.token.vo.TokenReceiveVO;
|
|
|
-import com.dragoninfo.dcuc.auth.token.vo.UserTokenInfoRespVO;
|
|
|
-import com.dragoninfo.dcuc.common.utils.ResponseUtil;
|
|
|
-import com.dragonsoft.duceap.base.entity.http.ResponseDTO;
|
|
|
-import com.dragonsoft.duceap.commons.util.ip.IpUtils;
|
|
|
-import com.dragonsoft.duceap.commons.util.string.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -37,13 +13,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.validation.Valid;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Optional;
|
|
|
-import java.util.Set;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
|
|
|
* <p>
|
|
|
*
|
|
@@ -58,12 +27,6 @@ import java.util.stream.Collectors;
|
|
|
@RequestMapping(value = "/api/auth-service/v4/")
|
|
|
public class AuthV4Controller {
|
|
|
|
|
|
- @Autowired
|
|
|
- private IApiDataAuthFacade apiDataAuthFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IAuthTokenFacade authTokenFacade;
|
|
|
-
|
|
|
@Autowired
|
|
|
private IZeroTrustAuthFacade zeroTrustAuthFacade;
|
|
|
|
|
@@ -149,22 +112,4 @@ public class AuthV4Controller {
|
|
|
return respVO;
|
|
|
}
|
|
|
|
|
|
- @PostMapping("token-receive")
|
|
|
- public ZeroTustMessageRespVO tokenReceive(@Valid @RequestBody TokenReceiveVO receiveVO) {
|
|
|
- return authTokenFacade.tokenReceive(receiveVO);
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("userOrgDataAuth")
|
|
|
- public ResultRespVO<DataAuthRespVO> userOrgDataAuth(@RequestBody UserOrgAuthReqVO userOrgAuthReqVO) {
|
|
|
-
|
|
|
- String orgCode = userOrgAuthReqVO.getOrgCode();
|
|
|
- String idcard = userOrgAuthReqVO.getIdcard();
|
|
|
-
|
|
|
- DataItemsDto dataItemsDto = apiDataAuthFacade.userOrgDataAuth(idcard, orgCode);
|
|
|
-
|
|
|
- DataAuthRespVO dataAuthRespVO = new DataAuthRespVO();
|
|
|
- dataAuthRespVO.setResourceId(dataItemsDto.getResourceCode());
|
|
|
- dataAuthRespVO.setItemIdentifier(dataItemsDto.getDataItemCode());
|
|
|
- return ResultRespVO.success(dataAuthRespVO);
|
|
|
- }
|
|
|
}
|