public dynamic ValidatedCaldavUser(string loginName, string token)
        {
            //判断这个人是否在北森数据库
            var user = AccountProxy.GetAssociatedUsersByLoginName(loginName);

            if (user == null)
            {
                return(null);
            }


            var userGuid = RedisCacheHelper.Get <string>(user.TenantId, MakeUserGuidKey(loginName));

            if (userGuid == null)
            {
                return(null);
            }

            if (SecurityHelper.GetMd5($"{user.TenantId}_{user.UserId}_Schedule_{userGuid}") == token)
            {
                //校验通过,去获取数据
                return("获取到北森的数据了!!!");
            }

            return(null);
        }
Beispiel #2
0
 public void TestAccountProxy()
 {
     string name = "*****@*****.**";
     var    a    = AccountProxy.GetAssociatedUsersByLoginName(name);
 }