| | |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.warpper.LoginUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.codec.binary.Base64; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class ShiroExtUtil { |
| | | private final String NAMES_DELIMETER = ","; |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | LoginUser loginUser = JSON.parseObject(onconParam, LoginUser.class); |
| | | System.out.println("当前登录用户:" + JSON.toJSONString(loginUser)); |
| | | log.info("当前登录用户:" + JSON.toJSONString(loginUser)); |
| | | String shiroUser = redisTemplate.opsForValue().get(loginUser.getOnconUUID()); |
| | | System.out.println("当前登录用户缓存数据:" + shiroUser); |
| | | log.info("当前登录用户缓存数据:" + shiroUser); |
| | | return JSON.parseObject(shiroUser, ShiroUser.class); |
| | | } |
| | | throw new GunsException(BizExceptionEnum.TOKEN_ERROR); |