|
|
|
@ -6,6 +6,7 @@ import cn.chjyj.szwh.service.LoginService; |
|
|
|
import cn.chjyj.szwh.service.UserService; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.auth0.jwt.JWT; |
|
|
|
import com.auth0.jwt.interfaces.Claim; |
|
|
|
import com.auth0.jwt.interfaces.DecodedJWT; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
@ -79,12 +80,14 @@ public class AdminUserController extends BaseController { |
|
|
|
List retlist = new ArrayList(); |
|
|
|
//解析token中到信息
|
|
|
|
DecodedJWT decode = JWT.decode(token); |
|
|
|
retlist.add(decode.getPayload()); |
|
|
|
//获取claim信息
|
|
|
|
Map<String,Claim> pcmap = decode.getClaims(); |
|
|
|
retlist.add(pcmap); |
|
|
|
String accountid = decode.getClaim("accountId").asString(); |
|
|
|
// 用户权限
|
|
|
|
Map auth = loginService.checkUser(accountid,murl,token); |
|
|
|
Map retmap = new HashMap(); |
|
|
|
retmap.put("auth",auth); |
|
|
|
retmap.put("auth",auth.get("data")); |
|
|
|
retlist.add(retmap); |
|
|
|
|
|
|
|
jsonObject.put("code",200); |
|
|
|
|