Esempio n. 1
0
        private static void InitializeRoutes()
        {
            IAuthenticatingRouterService authRouter = serviceManager.Get <IAuthenticatingRouterService>();

            authRouter.RegisterSemanticRoute <HtmlPageRoute>("GET:", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <UpdateField>("POST:updateField", RouteType.PublicRoute);
            // authRouter.RegisterSemanticRoute<UpdateSearchField>("POST:updateSearchField", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <GetDictionary>("GET:dictionary", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <GetDictionaryTreeHtml>("GET:dictionaryTreeHtml", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <GetDictionaryNodesHtml>("GET:dictionaryNodesHtml", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <RenderContext>("GET:renderContext", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <SearchContext>("POST:searchContext", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <ViewContext>("POST:viewContext", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <ClearDictionary>("POST:clearDictionary", RouteType.PublicRoute);
        }
Esempio n. 2
0
        private static void InitializeRoutes()
        {
            IAuthenticatingRouterService authRouter = serviceManager.Get <IAuthenticatingRouterService>();

            authRouter.RegisterSemanticRoute <HtmlPageRoute>("GET:", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <HtmlPageRoute>("GET:account/login", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <Login>("POST:account/login", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <Register>("POST:account/register", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <ForgotPassword>("POST:account/forgotPassword", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <Logout>("GET:account/logout", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <RegistrationToken>("GET:account/finishRegistration", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <ForgotPasswordToken>("GET:account/recoverPassword", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <NewPassword>("POST:account/recoverPassword", RouteType.PublicRoute);
            authRouter.RegisterSemanticRoute <ViewAccountInfo>("GET:account/updateAccountInfo", RouteType.AuthenticatedRoute);
            authRouter.RegisterSemanticRoute <UpdateAccountInfo>("POST:account/updateAccountInfo", RouteType.AuthenticatedRoute);
            authRouter.RegisterSemanticRoute <HtmlPageRoute>("GET:account/updateAccountInfo", RouteType.RoleRoute, Role.SuperAdmin);

            authRouter.RegisterSemanticRoute <HtmlPageRoute>("GET:authtest");
        }