public ActionResult Access(string menuId, string credential)
        {
            if (string.IsNullOrEmpty(credential))
            {
                return(null);
            }

            _authentication = new O7Authentication(Session);

            var credentialCookie = make_credential_cookie(credential);

            authenticate_user(credentialCookie);

            var argDomain = new object[] { credentialCookie.Login, credentialCookie.Password };
            var argFlow   = new object[] { credentialCookie.Login };

            var domain = O7DomainInstanceMaker.MakeInstance <SecurityFlow, BasicFlow>(argDomain, argFlow);
            var menus  = domain.Menus(credentialCookie.CompanyId, credentialCookie.BranchId, menuId);

            var menusResult = menus as O7SuccessResponse <List <O7Menu> >;

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

            _authentication.SetMenu(menusResult.Value1);

            return(RedirectToAction("Index", "Home"));
        }
Beispiel #2
0
        public ClientDomain ClientDomain(string login, string password)
        {
            var argDomain = new object[] { login, password };
            var argFlow   = new object[] { login };

            return(O7DomainInstanceMaker.MakeInstance <ClientBasicFlow, BasicFlow>(argDomain, argFlow));
        }
Beispiel #3
0
        public FinantialDomain FinantialDomain(string login, string password)
        {
            var argDomain = new object[] { login, password };
            var argFlow   = new object[] { login };

            return(O7DomainInstanceMaker.MakeInstance <FinantialFlow, BasicFlow>(argDomain, argFlow));
        }
Beispiel #4
0
        public SecurityDomain SecurityDomain(string login, string password)
        {
            var argDomain = new object[] { login, password };
            var argFlow   = new object[] { login };

            return(O7DomainInstanceMaker.MakeInstance <SecurityFlow, BasicFlow>(argDomain, argFlow));
        }