package org.jeecg.modules.cas.controller; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.hutool.crypto.SecureUtil; import org.apache.commons.lang.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CacheConstant; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.RedisUtil; import org.jeecg.modules.cas.util.CASServiceUtil; import org.jeecg.modules.cas.util.XmlUtils; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysUserService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; /** *
* CAS单点登录客户端登录认证 *
* * @Author zhoujf * @since 2018-12-20 */ @Slf4j @RestController @RequestMapping("/sys/cas/client") public class CasClientController { @Autowired private ISysUserService sysUserService; @Autowired private ISysDepartService sysDepartService; @Autowired private RedisUtil redisUtil; @Value("${cas.prefixUrl}") private String prefixUrl; @GetMapping("/validateLogin") public Object validateLogin(@RequestParam(name="ticket") String ticket, @RequestParam(name="service") String service, HttpServletRequest request, HttpServletResponse response) throws Exception { Result