第三方系统单点登录到金蝶云指南V3

背景:国家安全法发布,产品升级,安全策略进行调整,第三方系统登录授权安全性进行升级,需要控制某一条授权配置允许的登录用户信息,避免异常登录
支持补丁:2021年10月补丁
1.启用第三方系统登录授权

2 测试第三方系统单点登陆


允许全部用户登录:此应用ID、应用密钥 允许二开自定义登录链接,允许所有用户登录
指定用户登录:此应用ID、应用密钥 允许二开自定义登录链接,但只允许列表中用户进行登录
连接有效性:
链接仅供使用一次: 生成链接只允许登录一次
支持链接重复使用:生成的链接允许使用多次进行登录
3 在第三方系统中生成签名授权的URL
【参数格式】:ud=
{"dbid":"60a476ea609cb0","username":"0602ws","appid":"DataView","signeddata":"9c8dcf74e16912e58dc067cc9c405a76f56acff3","timestamp":"1632876418","lcid":"2052","origintype":"SimPas","entryrole":"","formid":"","formtype":"","pkid":"","otherargs":"|{'permitcount':'0'}","openmode":null}
【参数说明】:
dbid:数据中心的ID;
username:用户名称;
appid:应用程序ID,通过Administrator登录数据中心后,在【系统管理】分类的【第三方系统登录授权】功能里面进行新增维护;(云之家可以不填由querystring参数决定)
signeddata:参考文章【https://wenku.my7c.com/article/37406】;
timestamp:登录时间戳(Unix时间戳,定义为从格林威治时间1970年01月01日00时00分00秒起至现在的总秒数);
lcid(可选):语言ID,中文2052(默认),英文1033,繁体3076;
origintype: XT=云之家集成(同时要求entryrole=XT);SimPas=简单通行证集成;
entryrole:验证权限的入口角色;
formid: 登录后默认打开功能的表单id;
formtype:登录后默认打开功能的格式,目前有单据bill和列表list两种方式,没有列表的功能统一为bill;
pkid:formid对应表单的主键;formtype为list时忽略,formtype为bill时起作用,如果为空表示新增状态;
otherargs:作为用户自定义参数传入,使用于二开;
permitcount:允许登录次数,0 允许重复登录 ,1 只允许登录一次
具体内容和格式由二开人员确定,最终在指定表单的插件中通过GetCustomParameter(FormConst.StartAppArgs)获取,具体参考【https://wenku.my7c.com/article/37644 】
NET示例代码如下:
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kingdee.BOS.BusinessEntity.Login;
namespace PassportLogin
{
class Program
{
static void Main(string[] args)
{
int lcId = 2052;
long timestamp = DateTimeFormatUtils.CurrentTimeMillis() / 1000;//时间戳
string dbId = "57b11d0f7a3b1a";//数据中心ID
string usserName = "ly";//用户名称
string appId = "SRMLightApp";//第三方系统应用Id
string appSecret = "7d9169bfbdc34e9cbd96069db5e72917";//第三方系统应用秘钥
string[] arr = new string[] { dbId, usserName, appId, appSecret, timestamp.ToString() ,permitcount.GetString()};
string sign = Kingdee.BOS.Util.SHA1Util.GetSignature(arr);//签名
SimplePassportLoginArg arg = new SimplePassportLoginArg();
arg.appid = appId;
arg.dbid = dbId;
arg.lcid = lcId.ToString();
arg.origintype = "SimPas";
arg.signeddata = sign;
arg.timestamp = timestamp.ToString();
arg.username = usserName;
arg.entryrole = string.Empty;
arg.formid = string.Empty;
arg.formtype = string.Empty;
arg.otherargs = string.Format("|{{\'permitcount\':'{0}'}}", permitcount);
arg.pkid = string.Empty;
string argJosn
第三方系统单点登录到金蝶云指南V3
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



