| | |
| | | |
| | | // 构建授权信息 |
| | | User user = result.getData().getUser(); |
| | | Kv detail = result.getData().getDetail(); |
| | | |
| | | if (Func.isEmpty(user) || Func.isEmpty(user.getId())) { |
| | | throw new InvalidGrantException("passwordfree grant failure, user is null"); |
| | | } |
| | | // 判断当前用户是否被停用 |
| | | if(user.getUserStatus() == 1){ |
| | | throw new InvalidGrantException(TokenUtil.USER_LOCK); |
| | | } |
| | | Kv detail = result.getData().getDetail(); |
| | | if (user == null || user.getId() == null) { |
| | | throw new InvalidGrantException("passwordfree grant failure, user is null"); |
| | | } |
| | | bladeUserDetails = new BladeUserDetails(user.getId(), |
| | | tenantId, result.getData().getOauthId(), user.getName(), user.getRealName(), user.getDeptId(), user.getPostId(), user.getRoleId(), Func.join(result.getData().getRoles()), Func.toStr(user.getAvatar(), TokenUtil.DEFAULT_AVATAR), |