|
@@ -26,13 +26,12 @@ public class HwMeetingServiceImpl implements HwMeetingService {
|
|
|
*/
|
|
|
@Override
|
|
|
public String appauth() {
|
|
|
- String appId = meetingConfigService.selectMeetingConfigById((long) 2).getVal().toString();
|
|
|
- String userId = meetingConfigService.selectMeetingConfigById((long) 4).getVal().toString();
|
|
|
- String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal().toString();
|
|
|
- String appauth = meetingConfigService.selectMeetingConfigById((long) 5).getVal().toString();
|
|
|
+ String appId = meetingConfigService.selectMeetingConfigById((long) 2).getVal();
|
|
|
+ String userId = meetingConfigService.selectMeetingConfigById((long) 4).getVal();
|
|
|
+ String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal();
|
|
|
+ String appauth = meetingConfigService.selectMeetingConfigById((long) 5).getVal();
|
|
|
//64位随机字符串
|
|
|
String nonce = RandomUtil.randomString(64);
|
|
|
- System.out.println(nonce);
|
|
|
log.info("nonce:{}", nonce);
|
|
|
//鉴权信息
|
|
|
String authorization = getAuthorization(appId, userId, nonce);
|
|
@@ -52,7 +51,6 @@ public class HwMeetingServiceImpl implements HwMeetingService {
|
|
|
.execute().body();
|
|
|
//打印
|
|
|
log.info("result:{}", result);
|
|
|
-
|
|
|
return JSONUtil.parseObj(result).get("accessToken").toString();
|
|
|
}
|
|
|
|
|
@@ -61,19 +59,19 @@ public class HwMeetingServiceImpl implements HwMeetingService {
|
|
|
*/
|
|
|
@Override
|
|
|
public String getAuthorization(String appId, String userId, String nonce) {
|
|
|
- String appKey = meetingConfigService.selectMeetingConfigById((long) 3).getVal().toString();
|
|
|
+ String appKey = meetingConfigService.selectMeetingConfigById((long) 3).getVal();
|
|
|
String data = appId + ":" + userId + ":" + 0 + ":" + nonce;
|
|
|
String authorization = "HMAC-SHA256 signature=" + HmacSHA256.encode(data, appKey);
|
|
|
return authorization;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 绑定给当前创会帐号的VMR ID。通过查询云会议室及个人会议ID接口获取。
|
|
|
+ * 绑定给当前创会帐号的VMR_ID。通过查询云会议室及个人会议ID接口获取。
|
|
|
*/
|
|
|
@Override
|
|
|
public String vmrID(String token) {
|
|
|
- String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal().toString();
|
|
|
- String vmr = meetingConfigService.selectMeetingConfigById((long) 6).getVal().toString();
|
|
|
+ String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal();
|
|
|
+ String vmr = meetingConfigService.selectMeetingConfigById((long) 6).getVal();
|
|
|
//body
|
|
|
String result = HttpRequest.get(url + vmr)
|
|
|
.header("X-Access-Token", token)
|
|
@@ -92,8 +90,8 @@ public class HwMeetingServiceImpl implements HwMeetingService {
|
|
|
*/
|
|
|
@Override
|
|
|
public String conferences(String subject) {
|
|
|
- String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal().toString();
|
|
|
- String conferences = meetingConfigService.selectMeetingConfigById((long) 7).getVal().toString();
|
|
|
+ String url = meetingConfigService.selectMeetingConfigById((long) 1).getVal();
|
|
|
+ String conferences = meetingConfigService.selectMeetingConfigById((long) 7).getVal();
|
|
|
String token = appauth();
|
|
|
String vmrID = vmrID(token);
|
|
|
//body
|