@@ -58,6 +58,24 @@ namespace HarmonyCoreGenerator.Generator
5858 result.Add(StructureTaskHelper(targetSolution, "Generate Postman tests", "", targetSolution.SolutionFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataPostManTests" }, ^null))
5959 end
6060
61+ ;; Authentication
62+
63+ if (targetSolution.CustomAuthentication ?? false)
64+ begin
65+ ;; Add AuthenticationModels.dbl if it doesn't exist
66+ data authModelTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthModels" }, ^null)
67+ authModelTask.ReplaceFiles = false
68+ result.Add(authModelTask)
69+ ;; Add AuthenticationController.dbl if it doesn't exist
70+ data authControllerTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthController" }, ^null)
71+ authControllerTask.ReplaceFiles = false
72+ result.Add(authControllerTask)
73+ ;; Add AuthenticationTools.dbl if it doesn't exist
74+ data authToolsTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthTools" }, ^null)
75+ authToolsTask.ReplaceFiles = false
76+ result.Add(authToolsTask)
77+ end
78+
6179 ;;---------------------------------------------------------------------------------------------
6280 ;; Unit tests
6381
0 commit comments