update passport
This commit is contained in:
@@ -28,7 +28,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
// passport-for-sdk 外部SDK版本
|
||||
api 'com.zhidao.thirdlogin:third-login:1.0.2'
|
||||
api 'com.zhidao.thirdlogin:third-login:1.0.6'
|
||||
// passport-for-internal 内部SDK版本
|
||||
implementation 'com.zhidao.accountservice:account-sdk:1.0.18'
|
||||
|
||||
|
||||
@@ -96,15 +96,17 @@ public class MoGoAiCloudClient {
|
||||
}
|
||||
|
||||
// 初始化HttpDNS
|
||||
mHttpDnsConfig =
|
||||
new MogoHttpDnsConfig()
|
||||
.setContext(mContext)
|
||||
.setSn(mAiCloudClientConfig.getSn())
|
||||
.setEnv(mAiCloudClientConfig.getNetMode())
|
||||
.setShowDebugLog(mAiCloudClientConfig.isShowDebugLog())
|
||||
.setCurrentLocation(mAiCloudClientConfig.getIHttpDnsCurrentLocation())
|
||||
.setLoopCheckDelay(mAiCloudClientConfig.getLoopCheckDelay());
|
||||
MogoHttpDnsClient.INSTANCE.init(mHttpDnsConfig);
|
||||
if (mHttpDnsConfig == null) {
|
||||
mHttpDnsConfig =
|
||||
new MogoHttpDnsConfig()
|
||||
.setContext(mContext)
|
||||
.setSn(mAiCloudClientConfig.getSn())
|
||||
.setEnv(mAiCloudClientConfig.getNetMode())
|
||||
.setShowDebugLog(mAiCloudClientConfig.isShowDebugLog())
|
||||
.setCurrentLocation(mAiCloudClientConfig.getIHttpDnsCurrentLocation())
|
||||
.setLoopCheckDelay(mAiCloudClientConfig.getLoopCheckDelay());
|
||||
MogoHttpDnsClient.INSTANCE.init(mHttpDnsConfig);
|
||||
}
|
||||
|
||||
// 循环调用将数据传出去
|
||||
for (IMoGoTokenCallback tokenCallback : mTokenCallbacks) {
|
||||
@@ -121,6 +123,14 @@ public class MoGoAiCloudClient {
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "║ ErrorMessage:" + msg);
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "═════════════════════════════════════");
|
||||
|
||||
//如果本地sp缓存中存在sn和token,防止在鉴权失败后引起ERROR重置本地缓存
|
||||
if (mAiCloudClientConfig.getSn() != null
|
||||
&& !mAiCloudClientConfig.getSn().isEmpty()
|
||||
&& mAiCloudClientConfig.getToken() != null
|
||||
&& !mAiCloudClientConfig.getToken().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 变量赋值
|
||||
if (mAiCloudClientConfig != null) {
|
||||
mAiCloudClientConfig.setSn("");
|
||||
|
||||
@@ -80,7 +80,11 @@ public class ThirdPassportManager {
|
||||
environment = Environment.release;
|
||||
break;
|
||||
}
|
||||
|
||||
LoginManager.getInstance().registerTokenRefresh(result -> {
|
||||
if (mPassport != null) {
|
||||
mPassport.onSuccess(result.token, result.sn);
|
||||
}
|
||||
});
|
||||
LoginManager.getInstance().login(
|
||||
context,
|
||||
environment,
|
||||
@@ -91,7 +95,6 @@ public class ThirdPassportManager {
|
||||
Logger.e(TAG, "║ MoGo 鉴权失败 ");
|
||||
Logger.e(TAG, "║ 请配置 MoGoAiCloudClientConfig 信息");
|
||||
Logger.e(TAG, "═════════════════════════════════════");
|
||||
//todo 未来配置 errorCode设置回调错误码
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,29 +33,29 @@ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
|
||||
USERNAME=xintai
|
||||
PASSWORD=xintai2018
|
||||
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
|
||||
RELEASE=false
|
||||
RELEASE=true
|
||||
# AI CLOUD 云平台
|
||||
# 工具类
|
||||
MOGO_UTILS_VERSION=1.4.3.17
|
||||
MOGO_UTILS_VERSION=1.4.3.20
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.4.3.17
|
||||
MOGO_NETWORK_VERSION=1.4.3.20
|
||||
# 网络DNS
|
||||
MOGO_HTTPDNS_VERSION=1.4.3.17
|
||||
MOGO_HTTPDNS_VERSION=1.4.3.20
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.3.17
|
||||
MOGO_PASSPORT_VERSION=1.4.3.20
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.3.17
|
||||
MOGO_SOCKET_VERSION=1.4.3.20
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.3.17
|
||||
MOGO_REALTIME_VERSION=1.4.3.20
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.3.17
|
||||
MOGO_TANLU_VERSION=1.4.3.20
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.3.17
|
||||
MOGO_LIVE_VERSION=1.4.3.20
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.3.17
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.3.20
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.3.17
|
||||
MOGO_LOCATION_VERSION=1.4.3.20
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.17
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.20
|
||||
# v2x
|
||||
MOGO_V2X_VERSION=1.4.3.17
|
||||
MOGO_V2X_VERSION=1.4.3.20
|
||||
|
||||
Reference in New Issue
Block a user