|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.tuoheng.constants.OidcConstant; |
|
|
import com.tuoheng.constants.OidcConstant; |
|
|
import com.tuoheng.constants.ThirdConstant; |
|
|
import com.tuoheng.constants.ThirdConstant; |
|
|
|
|
|
import com.tuoheng.model.result.ProfileResult; |
|
|
import com.tuoheng.model.result.TokenResult; |
|
|
import com.tuoheng.model.result.TokenResult; |
|
|
import com.tuoheng.service.ThirdService; |
|
|
import com.tuoheng.service.ThirdService; |
|
|
import com.tuoheng.until.HttpUtils; |
|
|
import com.tuoheng.until.HttpUtils; |
|
|
|
|
|
|
|
|
//此时通过token获取当前用户的相关权限信息并进行封装 |
|
|
//此时通过token获取当前用户的相关权限信息并进行封装 |
|
|
tokenResult = getClientResult(tokenResult); |
|
|
tokenResult = getClientResult(tokenResult); |
|
|
//数据封装完毕返回数据 以及相关地址 -> 是否重定向 |
|
|
//数据封装完毕返回数据 以及相关地址 -> 是否重定向 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return JsonResult.success(tokenResult); |
|
|
return JsonResult.success(tokenResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tokenResult.setSub(result.getUserName()); |
|
|
tokenResult.setSub(result.getUserName()); |
|
|
tokenResult.setUserId(result.getUserId()); |
|
|
tokenResult.setUserId(result.getUserId()); |
|
|
tokenResult.setUserName(result.getUserName()); |
|
|
tokenResult.setUserName(result.getUserName()); |
|
|
|
|
|
ProfileResult profile = tokenResult.getProfile(); |
|
|
|
|
|
profile.setAuthority(result.getAuthorityList()); |
|
|
|
|
|
profile.setClientRoleList(result.getClientRoleDtoList()); |
|
|
|
|
|
profile.setUserId(result.getUserId()); |
|
|
|
|
|
profile.setUserName(result.getUserName()); |
|
|
|
|
|
profile.setSub(result.getUserName()); |
|
|
|
|
|
tokenResult.setProfile(profile); |
|
|
|
|
|
|
|
|
return tokenResult; |
|
|
return tokenResult; |
|
|
|
|
|
|