예제 #1
0
        public static void AddAuthServer(string solutionDirectory, IFileSystem fileSystem, AuthServerTemplate template)
        {
            SolutionBuilder.BuildAuthServerProject(solutionDirectory, template.Name, fileSystem);

            AuthServerLaunchSettingsBuilder.CreateLaunchSettings(solutionDirectory, template.Name, template.Port, fileSystem);
            StartupBuilder.CreateAuthServerStartup(solutionDirectory, template.Name, fileSystem);
            ProgramBuilder.CreateAuthServerProgram(solutionDirectory, template.Name, fileSystem);
            AuthServerConfigBuilder.CreateConfig(solutionDirectory, template, fileSystem);
            AppSettingsBuilder.CreateAuthServerAppSettings(solutionDirectory, template.Name, fileSystem);

            AuthServerPackageJsonBuilder.CreatePackageJson(solutionDirectory, template.Name, fileSystem);
            AuthServerTailwindConfigBuilder.CreateTailwindConfig(solutionDirectory, template.Name, fileSystem);
            AuthServerPostCssBuilder.CreatePostCss(solutionDirectory, template.Name, fileSystem);

            // controllers
            AuthServerAccountControllerBuilder.CreateAccountController(solutionDirectory, template.Name, fileSystem);
            AuthServerExternalControllerBuilder.CreateExternalController(solutionDirectory, template.Name, fileSystem);
            // AuthServerHomeControllerBuilder.CreateHomeController(projectDirectory, template.Name, fileSystem);

            // view models + models
            AuthServerAccountViewModelsBuilder.CreateViewModels(solutionDirectory, template.Name, fileSystem);
            AuthServerSharedViewModelsBuilder.CreateViewModels(solutionDirectory, template.Name, fileSystem);
            AuthServerExternalModelsBuilder.CreateModels(solutionDirectory, template.Name, fileSystem);
            AuthServerAccountModelsBuilder.CreateModels(solutionDirectory, template.Name, fileSystem);

            // views
            AuthServerAccountViewsBuilder.CreateLoginView(solutionDirectory, template.Name, fileSystem);
            AuthServerAccountViewsBuilder.CreateLogoutView(solutionDirectory, template.Name, fileSystem);
            AuthServerAccountViewsBuilder.CreateAccessDeniedView(solutionDirectory, template.Name, fileSystem);
            AuthServerSharedViewsBuilder.CreateLayoutView(solutionDirectory, template.Name, fileSystem);
            AuthServerSharedViewsBuilder.CreateStartView(solutionDirectory, template.Name, fileSystem);
            AuthServerSharedViewsBuilder.CreateViewImports(solutionDirectory, template.Name, fileSystem);

            // css files for TW
            AuthServerCssBuilder.CreateOutputCss(solutionDirectory, template.Name, fileSystem);
            AuthServerCssBuilder.CreateSiteCss(solutionDirectory, template.Name, fileSystem);

            // helpers
            AuthServerTestUsersBuilder.CreateTestModels(solutionDirectory, template.Name, fileSystem);
            AuthServerExtensionsBuilder.CreateExtensions(solutionDirectory, template.Name, fileSystem);
            SecurityHeadersAttributeBuilder.CreateAttribute(solutionDirectory, template.Name, fileSystem);
        }