This commit is contained in:
parent
d90291dcd5
commit
946c9abaca
@ -173,8 +173,20 @@ public class InterfaceForwardCommon(
|
||||
foreach (var item in configs.Where(x => x.Flag == AuthParameterFlag.InParameter))
|
||||
{
|
||||
Debug.Assert(item.ParameterAlias != null, "item.ParameterAlias != null");
|
||||
|
||||
// 兼容account占位符
|
||||
if (item.Value1 == GlobalConst.FromAccount)
|
||||
{
|
||||
body[item.ParameterAlias] =
|
||||
accountFieldCache.FirstOrDefault(x =>
|
||||
x.FieldName.Equals(item.ParameterAlias, StringComparison.OrdinalIgnoreCase))?.FieldValue ??
|
||||
string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
body[item.ParameterAlias] = item.Value1;
|
||||
}
|
||||
}
|
||||
|
||||
// 构建授权上下文
|
||||
interfaceDto.TargetInterface.FlowCode = interfaceDto.TargetInterface.FlowCode.IsNullOrWhiteSpace()
|
||||
@ -208,7 +220,8 @@ public class InterfaceForwardCommon(
|
||||
// 授权也走主流程
|
||||
if (!cacheContext.TargetServiceProvider.AuthInterfaceCode.IsNullOrWhiteSpace())
|
||||
{
|
||||
Debug.Assert(cacheContext.ServiceProviderAuthInterface != null, "cacheContext.ServiceProviderAuthInterface != null");
|
||||
Debug.Assert(cacheContext.ServiceProviderAuthInterface != null,
|
||||
"cacheContext.ServiceProviderAuthInterface != null");
|
||||
var flow = GetForwardFlow(cacheContext.ServiceProviderAuthInterface.TargetInterface.FlowCode!);
|
||||
_flows.Add(cacheContext.ServiceProviderAuthInterface.TargetInterface.Code, flow);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user