[6.2.9] extends the crtfile
This commit is contained in:
@@ -280,9 +280,9 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = CHAIN_CODE_CLOUD_PASSPORT_AUTH_OK,
|
||||
paramIndexes = [0]
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
override fun onSuccess(securityKey: String) {
|
||||
override fun onSuccess(securityKey: String, rootKey: String) {
|
||||
CallerLogger.d(
|
||||
"$M_MAIN$TAG",
|
||||
"onSuccess securityKey:$securityKey , thread:${Thread.currentThread().name}"
|
||||
@@ -295,6 +295,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
SharedPrefsMgr.getInstance()
|
||||
.putBoolean("securityKey-${DebugConfig.getNetMode()}", true)
|
||||
CallerCloudListenerManager.invokeCloudCrtFile(securityKey, rootKey)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.startup.stageone.secret;
|
||||
|
||||
public interface IPassportSecret {
|
||||
|
||||
void onSuccess(String secretKey);
|
||||
void onSuccess(String secretKey, String rootKey);
|
||||
|
||||
void onFailed(int errorCode, String errorMsg);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
|
||||
import constant.ErrorCode;
|
||||
import domain.Passport;
|
||||
@@ -42,14 +43,15 @@ public class PassPortSecret {
|
||||
secretCB.onFailed(r.getCode(), r.getMsg());
|
||||
}
|
||||
Passport passport = (Passport) r.getData();
|
||||
domain.R<String> res = passportService.deviceActive(passport);
|
||||
domain.R<List<String>> res = passportService.deviceActive(passport);
|
||||
if (res.getCode() != ErrorCode.OK.getCode()) {
|
||||
secretCB.onFailed(res.getCode(), res.getMsg());
|
||||
} else {
|
||||
String secretKey = res.getData();
|
||||
List<String> secretKey = res.getData();
|
||||
try {
|
||||
String result = new String(Base64.encode(secretKey.getBytes("utf-8"), Base64.NO_WRAP), "utf-8");
|
||||
secretCB.onSuccess(result);
|
||||
String result = new String(Base64.encode(secretKey.get(0).getBytes("utf-8"), Base64.NO_WRAP), "utf-8");
|
||||
String root = new String(Base64.encode(secretKey.get(1).getBytes("utf-8"), Base64.NO_WRAP), "utf-8");
|
||||
secretCB.onSuccess(result, root);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
secretCB.onFailed(5000, "url encode error :" + secretKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user