1234567891011121314151617181920212223242526272829303132 |
- import 'dart:core';
- import 'package:fis_jsonrpc/client_base.dart';
- import 'package:fis_common/json_convert.dart';
- import 'authentication.m.dart';
- class AuthenticationService extends JsonRpcClientBase {
- AuthenticationService(
- String host, {
- String serviceName = "IAuthenticationService",
- Map<String, String>? headers,
- int? timeout,
- }) : super(
- host,
- serviceName,
- headers: headers,
- timeout: timeout,
- ) {
- /// 注册响应实体反序列化处理器
- FJsonConvert.setDecoder((map) => StorageAuthenticationInfo.fromJson(map));
- }
- Future<StorageAuthenticationInfo> getAuthorizationAsync(String token,UploadFileType fileType) async {
- var rpcRst = await call("GetAuthorizationAsync", [token,fileType]);
- var result = StorageAuthenticationInfo.fromJson(rpcRst as Map<String, dynamic>);
- return result;
- }
- }
|