Пример #1
0
        public void Configuration(IAppBuilder app)
        {
            //// security

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = CommonHelper.DefaultAuthenticationType,
                ExpireTimeSpan = ConfigurationHelper.SessionTimeoutInterval,
                LoginPath = new PathString("/account/login"),
                LogoutPath = new PathString("/account/logout"),
                ReturnUrlParameter = "return_url",
                Provider = new CookieAuthenticationProvider
                {
                    OnApplyRedirect = context =>
                    {
                        if (!context.Request.IsAjaxRequest())
                        {
                            context.Response.Redirect(context.RedirectUri);
                        }
                    },
                }
            });

            //// odata service

            app.ConfigureProductService();
            app.ConfigureSalesService();
            app.ConfigureSecurityService();
            app.ConfigureSsisService();
        }