[master] update version to fix secrity key bug

This commit is contained in:
zhongchao
2023-08-01 11:45:17 +08:00
parent 74d95bed7f
commit a483ae2961
4 changed files with 31 additions and 15 deletions

View File

@@ -20,8 +20,8 @@ class HttpHeaderInterceptor : Interceptor {
.header("sn",MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn)
.method(original.method(), original.body())
.build()
if(MoGoAiCloudClient.getInstance().aiCloudClientConfig.authPubKey.isNotBlank()){
request = request.newBuilder().header("authKey",MoGoAiCloudClient.getInstance().aiCloudClientConfig.authPubKey).build()
if(MoGoAiCloudClient.getInstance().aiCloudClientConfig.securityKey.isNotBlank()){
request = request.newBuilder().header("authKey",MoGoAiCloudClient.getInstance().aiCloudClientConfig.securityKey).build()
}
return chain.proceed(request)
}

View File

@@ -99,7 +99,9 @@ public class MoGoAiCloudClient {
@Override
public void onError(int code, String msg) {
Toast.makeText(mContext, "MoGo鉴权失败", Toast.LENGTH_SHORT).show();
if(mAiCloudClientConfig.isShowToastLog()){
Toast.makeText(mContext, "MoGo鉴权失败", Toast.LENGTH_SHORT).show();
}
Log.e(TAG, "═════════════════════════════════════");
Log.e(TAG, "║ MoGo鉴权失败 ");
Log.e(TAG, "║ ErrorCode" + code);

View File

@@ -53,7 +53,7 @@ public class MoGoAiCloudClientConfig {
*/
private String thirdPartyDeviceId = "";
/**
* APP key
* passport APP key
*/
private String thirdPartyAppKey = "";
/**
@@ -64,6 +64,11 @@ public class MoGoAiCloudClientConfig {
// 必传, Socket长链接时做校验
private String secretKey = "";
/**
* 应用安全校验值用于header
*/
private String securityKey = "";
/**
* 签名信息
*/
@@ -213,6 +218,14 @@ public class MoGoAiCloudClientConfig {
this.secretKey = secretKey;
}
public String getSecurityKey() {
return securityKey;
}
public void setSecurityKey(String securityKey) {
this.securityKey = securityKey;
}
/**
* 获取AI云平台分配给三方应用的签名密钥需要从AI云平台申请
*
@@ -503,6 +516,7 @@ public class MoGoAiCloudClientConfig {
", thirdPartyAppKey='" + thirdPartyAppKey + '\'' +
", authPubKey='" + authPubKey + '\'' +
", secretKey='" + secretKey + '\'' +
", securityKey='" + securityKey + '\'' +
", thirdPartySignSecret='" + thirdPartySignSecret + '\'' +
", thirdLogin=" + thirdLogin +
", passportUrl='" + passportUrl + '\'' +

View File

@@ -36,24 +36,24 @@ PASSWORD=xintai2018
RELEASE=true
# AI CLOUD 云平台
# 工具类
MOGO_UTILS_VERSION=1.4.7.11
MOGO_UTILS_VERSION=1.4.7.12
# 网络请求
MOGO_NETWORK_VERSION=1.4.7.11
MOGO_NETWORK_VERSION=1.4.7.12
# 鉴权
MOGO_PASSPORT_VERSION=1.4.7.11
MOGO_PASSPORT_VERSION=1.4.7.12
# 常链接
MOGO_SOCKET_VERSION=1.4.7.11
MOGO_SOCKET_VERSION=1.4.7.12
# 数据采集
MOGO_REALTIME_VERSION=1.4.7.11
MOGO_REALTIME_VERSION=1.4.7.12
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.4.7.11
MOGO_TANLU_VERSION=1.4.7.12
# 直播推流
MOGO_LIVE_VERSION=1.4.7.11
MOGO_LIVE_VERSION=1.4.7.12
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.4.7.11
MOGO_TRAFFICLIVE_VERSION=1.4.7.12
# 定位服务
MOGO_LOCATION_VERSION=1.4.7.11
MOGO_LOCATION_VERSION=1.4.7.12
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.4.7.11
MOGO_TELEMATIC_VERSION=1.4.7.12
# v2x
MOGO_V2X_VERSION=1.4.7.11
MOGO_V2X_VERSION=1.4.7.12