public string AuthenticateUser(IAuthPackage authPackage)
        {
            DataForm df = new DataForm();

            df.SetValue("LoginName", authPackage.LoginName);
            df.SetValue("Password", authPackage.Password);

            string sid = USServiceClient.CreateUserState(df.ToString(), string.Empty, string.Empty, string.Empty, string.Empty);

            if (!String.IsNullOrEmpty(sid) && sid.Length >= 30)
            {
                SetAuthenticationTicket(sid, authPackage.LoginName);
            }

            return(sid);
        }
Esempio n. 2
0
        public string GetQuerySchema()
        {
            var listCofig = this.S_DOC_Space.S_DOC_ListConfig.FirstOrDefault(d => d.RelationID == this.ID);
            var queryList = listCofig.S_DOC_QueryParam.OrderBy(d => d.QuerySort).ToList();
            var df        = new DataForm();

            foreach (var item in queryList)
            {
                var di = df.AddItem(item.AttrField, "");
                di.SetAttr("InnerName", item.InnerField);
                di.SetAttr("Match", item.QueryType);
                if (item.InKey == TrueOrFalse.True.ToString() && (item.QueryType == QueryType.EQ.ToString() || item.QueryType == QueryType.LK.ToString()))
                {
                    di.SetAttr("InKey", "true");
                }
                if (item.QueryType == QueryType.LK.ToString())
                {
                    di.SetAttr("InSplit", "true");
                }
            }
            return(df.ToString());
        }