コード例 #1
0
        public ActionResult BackOffice()
        {
            var model = new BackOfficeViewModel
            {
                LoginUrl = $"{ConfigurationManager.AppSettings["BackOfficeFrontendUrl"]}account/login/saml/" + ConfigurationManager.AppSettings["TenancyName"]
            };

            return(View("BackOffice", model));
        }
コード例 #2
0
        public ActionResult BackOffice()
        {
            var model = new BackOfficeViewModel
            {
                LoginUrl = $"{ConfigurationManager.AppSettings["BackOfficeFrontendUrl"]}account/login/docket-manager-saml"
            };

            return(View("BackOffice", model));
        }
コード例 #3
0
        public IActionResult BackOffice()
        {
            /*
             * Here we want to display a BackOffice in <iframe> element. We try to sign in to a tenant and if it does not exist,
             * we just create it.
             * To identity tenants, we use a so-called TenancyName parameter. It can be any URL-friendly string, however, we
             * recommend building it based on the domain name of your customer store (we do it for Shopify).
             *
             * For this example, we will hardcode a TenancyName, but in a real-life application, you are going to determine it
             * based on the account of a customer.
             */
            var storeUrl = HttpUtility.UrlEncode(_configuration["BackOffice:TenantName"]);
            var model    = new BackOfficeViewModel {
                LoginUrl = $"{_configuration["BackOffice:FrontendUrl"]}account/login/docket-manager?shop={storeUrl}"
            };

            return(View("BackOffice", model));
        }