|
@@ -1,9 +1,11 @@
|
|
|
library fis_jsonrpc;
|
|
|
|
|
|
import 'dart:collection';
|
|
|
+import 'dart:convert';
|
|
|
|
|
|
import 'package:fis_common/extensions/type.dart';
|
|
|
import 'package:fis_common/logger/logger.dart';
|
|
|
+import 'package:fis_jsonrpc/encrpyt.dart';
|
|
|
|
|
|
import 'client_base.dart';
|
|
|
import 'interceptor.dart';
|
|
@@ -44,6 +46,24 @@ class JsonRpcProxy {
|
|
|
|
|
|
static PlatformService? _platformService;
|
|
|
|
|
|
+ /// 请求加密配置
|
|
|
+ JsonRpcEncryptConfig get requestEncryptConfig =>
|
|
|
+ JsonRpcClientBase.requestEncryptConfig;
|
|
|
+ set requestEncryptConfig(JsonRpcEncryptConfig config) {
|
|
|
+ JsonRpcClientBase.requestEncryptConfig = config;
|
|
|
+ final cfgJson = jsonEncode(config.toJson());
|
|
|
+ logger.i("JsonRpcProxy - set RequestEncryptConfig: $cfgJson.");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// 响应加密配置
|
|
|
+ JsonRpcEncryptConfig get responseEncryptConfig =>
|
|
|
+ JsonRpcClientBase.responseEncryptConfig;
|
|
|
+ set responseEncryptConfig(JsonRpcEncryptConfig config) {
|
|
|
+ JsonRpcClientBase.responseEncryptConfig = config;
|
|
|
+ final cfgJson = jsonEncode(config.toJson());
|
|
|
+ logger.i("JsonRpcProxy - set ResponseEncryptConfig: $cfgJson.");
|
|
|
+ }
|
|
|
+
|
|
|
/* 服务代理设置 Start */
|
|
|
|
|
|
/// 平台服务
|