Compare commits
	
		
			2 Commits
		
	
	
		
			82166f5042
			...
			feature/pi
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| de418a123e | |||
| 179e94979c | 
							
								
								
									
										19
									
								
								.gitea/workflows/pipeline.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.gitea/workflows/pipeline.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | name: Core Thalos DAL - Deploy | ||||||
|  | run-name: ${{ gitea.actor }} is testing out Gitea Actions | ||||||
|  | on: [push] | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   Explore-Gitea-Actions: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |       - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event." | ||||||
|  |       - run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!" | ||||||
|  |       - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." | ||||||
|  |       - name: Check out repository code | ||||||
|  |         uses: actions/checkout@v4 | ||||||
|  |       - run: echo "The ${{ gitea.repository }} repository has been cloned to the runner." | ||||||
|  |       - run: echo "The workflow is now ready to test your code on the runner." | ||||||
|  |       - name: List files in the repository | ||||||
|  |         run: | | ||||||
|  |           ls ${{ gitea.workspace }} | ||||||
|  |       - run: echo "This job's status is ${{ job.status }}." | ||||||
| @@ -25,7 +25,7 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|     [Produces(MimeTypes.ApplicationJson)] |     [Produces(MimeTypes.ApplicationJson)] | ||||||
|     [Consumes(MimeTypes.ApplicationJson)] |     [Consumes(MimeTypes.ApplicationJson)] | ||||||
|     [ApiController] |     [ApiController] | ||||||
|     [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |     [AllowAnonymous] | ||||||
|     public class ModuleController(IModuleProvider service) : ControllerBase |     public class ModuleController(IModuleProvider service) : ControllerBase | ||||||
|     { |     { | ||||||
|         /// <summary> |         /// <summary> | ||||||
| @@ -39,7 +39,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<ModuleAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<ModuleAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Permission("ModuleManagement.Read, RoleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Read, RoleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllModulesAsync(CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllModulesAsync(CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetAllModules(cancellationToken).ConfigureAwait(false); |             var result = await service.GetAllModules(cancellationToken).ConfigureAwait(false); | ||||||
| @@ -59,7 +60,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<ModuleAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<ModuleAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Permission("ModuleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllModulesByList([FromBody] string[] modules, CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllModulesByList([FromBody] string[] modules, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (modules == null || !modules.Any()) |             if (modules == null || !modules.Any()) | ||||||
| @@ -85,7 +87,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("ModuleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetModuleByIdAsync([FromRoute] string id, CancellationToken cancellationToken) |         public async Task<IActionResult> GetModuleByIdAsync([FromRoute] string id, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetModuleById(id, cancellationToken).ConfigureAwait(false); |             var result = await service.GetModuleById(id, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -108,7 +111,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal e|ror.</response> |         /// <response code="500">The service internal e|ror.</response> | ||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status201Created)] |         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status201Created)] | ||||||
|         [Permission("ModuleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Write")] | ||||||
|         public async Task<IActionResult> CreateModuleAsync([FromBody] ModuleRequest newModule, CancellationToken cancellationToken) |         public async Task<IActionResult> CreateModuleAsync([FromBody] ModuleRequest newModule, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.CreateModule(newModule, cancellationToken).ConfigureAwait(false); |             var result = await service.CreateModule(newModule, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -130,7 +134,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("ModuleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Write")] | ||||||
|         public async Task<IActionResult> UpdateModuleAsync([FromRoute] string id, ModuleAdapter entity, CancellationToken cancellationToken) |         public async Task<IActionResult> UpdateModuleAsync([FromRoute] string id, ModuleAdapter entity, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (id != entity.Id?.ToString()) |             if (id != entity.Id?.ToString()) | ||||||
| @@ -158,7 +163,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(ModuleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("ModuleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("ModuleManagement.Write")] | ||||||
|         public async Task<IActionResult> ChangeModuleStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) |         public async Task<IActionResult> ChangeModuleStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.ChangeModuleStatus(id, newStatus, cancellationToken).ConfigureAwait(false); |             var result = await service.ChangeModuleStatus(id, newStatus, cancellationToken).ConfigureAwait(false); | ||||||
|   | |||||||
| @@ -25,7 +25,6 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|     [Produces(MimeTypes.ApplicationJson)] |     [Produces(MimeTypes.ApplicationJson)] | ||||||
|     [Consumes(MimeTypes.ApplicationJson)] |     [Consumes(MimeTypes.ApplicationJson)] | ||||||
|     [ApiController] |     [ApiController] | ||||||
|     [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |  | ||||||
|     public class PermissionController(IPermissionProvider service) : ControllerBase |     public class PermissionController(IPermissionProvider service) : ControllerBase | ||||||
|     { |     { | ||||||
|         /// <summary> |         /// <summary> | ||||||
| @@ -39,7 +38,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<PermissionAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<PermissionAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Permission("PermissionManagement.Read, RoleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Read, RoleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllPermissionsAsync(CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllPermissionsAsync(CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetAllPermissions(cancellationToken).ConfigureAwait(false); |             var result = await service.GetAllPermissions(cancellationToken).ConfigureAwait(false); | ||||||
| @@ -59,7 +59,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<PermissionAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<PermissionAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Permission("PermissionManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllPermissionsByList([FromBody] string[] permissions, CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllPermissionsByList([FromBody] string[] permissions, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (permissions == null || !permissions.Any()) |             if (permissions == null || !permissions.Any()) | ||||||
| @@ -84,7 +85,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("PermissionManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Read")] | ||||||
|         public async Task<IActionResult> GetPermissionByIdAsync([FromRoute] string id, CancellationToken cancellationToken) |         public async Task<IActionResult> GetPermissionByIdAsync([FromRoute] string id, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetPermissionById(id, cancellationToken).ConfigureAwait(false); |             var result = await service.GetPermissionById(id, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -107,7 +109,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal e|ror.</response> |         /// <response code="500">The service internal e|ror.</response> | ||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status201Created)] |         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status201Created)] | ||||||
|         [Permission("PermissionManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Write")] | ||||||
|         public async Task<IActionResult> CreatePermissionAsync([FromBody] PermissionRequest newPermission, CancellationToken cancellationToken) |         public async Task<IActionResult> CreatePermissionAsync([FromBody] PermissionRequest newPermission, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.CreatePermission(newPermission, cancellationToken).ConfigureAwait(false); |             var result = await service.CreatePermission(newPermission, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -129,7 +132,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("PermissionManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Write")] | ||||||
|         public async Task<IActionResult> UpdatePermissionAsync([FromRoute] string id, PermissionAdapter entity, CancellationToken cancellationToken) |         public async Task<IActionResult> UpdatePermissionAsync([FromRoute] string id, PermissionAdapter entity, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (id != entity.Id?.ToString()) |             if (id != entity.Id?.ToString()) | ||||||
| @@ -157,7 +161,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [Consumes(MimeTypes.ApplicationJson)] |         [Consumes(MimeTypes.ApplicationJson)] | ||||||
|         [Produces(MimeTypes.ApplicationJson)] |         [Produces(MimeTypes.ApplicationJson)] | ||||||
|         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(PermissionAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("PermissionManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("PermissionManagement.Write")] | ||||||
|         public async Task<IActionResult> ChangePermissionStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) |         public async Task<IActionResult> ChangePermissionStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.ChangePermissionStatus(id, newStatus, cancellationToken).ConfigureAwait(false); |             var result = await service.ChangePermissionStatus(id, newStatus, cancellationToken).ConfigureAwait(false); | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|     [Produces(MimeTypes.ApplicationJson)] |     [Produces(MimeTypes.ApplicationJson)] | ||||||
|     [Consumes(MimeTypes.ApplicationJson)] |     [Consumes(MimeTypes.ApplicationJson)] | ||||||
|     [ApiController] |     [ApiController] | ||||||
|     [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |  | ||||||
|     public class RoleController(IRoleProvider service) : ControllerBase |     public class RoleController(IRoleProvider service) : ControllerBase | ||||||
|     { |     { | ||||||
|         /// <summary> |         /// <summary> | ||||||
| @@ -36,7 +35,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<RoleAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<RoleAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllRolesAsync(CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllRolesAsync(CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetAllRoles(cancellationToken).ConfigureAwait(false); |             var result = await service.GetAllRoles(cancellationToken).ConfigureAwait(false); | ||||||
| @@ -54,7 +54,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [Route(Routes.Id)] |         [Route(Routes.Id)] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Read")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Read")] | ||||||
|         public async Task<IActionResult> GetRoleByIdAsync([FromRoute] string id, CancellationToken cancellationToken) |         public async Task<IActionResult> GetRoleByIdAsync([FromRoute] string id, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetRoleById(id, cancellationToken).ConfigureAwait(false); |             var result = await service.GetRoleById(id, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -77,7 +78,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status201Created)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status201Created)] | ||||||
|         [Permission("RoleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Write")] | ||||||
|         public async Task<IActionResult> CreateRoleAsync([FromBody] RoleRequest newRole, CancellationToken cancellationToken) |         public async Task<IActionResult> CreateRoleAsync([FromBody] RoleRequest newRole, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.CreateRole(newRole, cancellationToken).ConfigureAwait(false); |             var result = await service.CreateRole(newRole, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -97,7 +99,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPut] |         [HttpPut] | ||||||
|         [Route(Routes.Id)] |         [Route(Routes.Id)] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Write")] | ||||||
|         public async Task<IActionResult> UpdateRoleAsync([FromRoute] string id, [FromBody] RoleAdapter entity, CancellationToken cancellationToken) |         public async Task<IActionResult> UpdateRoleAsync([FromRoute] string id, [FromBody] RoleAdapter entity, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (id != entity.Id?.ToString()) |             if (id != entity.Id?.ToString()) | ||||||
| @@ -123,7 +126,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPatch] |         [HttpPatch] | ||||||
|         [Route(Routes.ChangeStatus)] |         [Route(Routes.ChangeStatus)] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Write")] | ||||||
|         public async Task<IActionResult> ChangeRoleStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) |         public async Task<IActionResult> ChangeRoleStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.ChangeRoleStatus(id, newStatus, cancellationToken).ConfigureAwait(false); |             var result = await service.ChangeRoleStatus(id, newStatus, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -142,7 +146,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpPost(Routes.AddApplication)] |         [HttpPost(Routes.AddApplication)] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Write")] | ||||||
|         public async Task<IActionResult> AddApplicationToRoleAsync([FromRoute] string roleId, [FromRoute] ApplicationsEnum application, CancellationToken cancellationToken) |         public async Task<IActionResult> AddApplicationToRoleAsync([FromRoute] string roleId, [FromRoute] ApplicationsEnum application, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.AddApplicationToRole(roleId, application, cancellationToken).ConfigureAwait(false); |             var result = await service.AddApplicationToRole(roleId, application, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -161,7 +166,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpDelete(Routes.RemoveApplication)] |         [HttpDelete(Routes.RemoveApplication)] | ||||||
|         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(RoleAdapter), StatusCodes.Status200OK)] | ||||||
|         [Permission("RoleManagement.Write")] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|  |         //[Permission("RoleManagement.Write")] | ||||||
|         public async Task<IActionResult> RemoveApplicationFromRoleAsync([FromRoute] string roleId, [FromRoute] ApplicationsEnum application, CancellationToken cancellationToken) |         public async Task<IActionResult> RemoveApplicationFromRoleAsync([FromRoute] string roleId, [FromRoute] ApplicationsEnum application, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.RemoveApplicationFromRole(roleId, application, cancellationToken).ConfigureAwait(false); |             var result = await service.RemoveApplicationFromRole(roleId, application, cancellationToken).ConfigureAwait(false); | ||||||
|   | |||||||
| @@ -35,8 +35,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [ProducesResponseType(typeof(IEnumerable<UserAdapter>), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(IEnumerable<UserAdapter>), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Read")] |         //[Permission("UserManagement.Read")] | ||||||
|         public async Task<IActionResult> GetAllUsers(CancellationToken cancellationToken) |         public async Task<IActionResult> GetAllUsers(CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetAllUsers(cancellationToken).ConfigureAwait(false); |             var result = await service.GetAllUsers(cancellationToken).ConfigureAwait(false); | ||||||
| @@ -54,8 +54,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [Route(Routes.Id)] |         [Route(Routes.Id)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Read")] |         //[Permission("UserManagement.Read")] | ||||||
|         public async Task<IActionResult> GetUserById([FromRoute] string id, CancellationToken cancellationToken) |         public async Task<IActionResult> GetUserById([FromRoute] string id, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetUserById(id, cancellationToken).ConfigureAwait(false); |             var result = await service.GetUserById(id, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -79,7 +79,7 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [Route(Routes.Email)] |         [Route(Routes.Email)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.GoogleScheme}")] |         //[Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.AzureScheme}")] | ||||||
|         public async Task<IActionResult> GetUserByEmail([FromRoute] string email, CancellationToken cancellationToken) |         public async Task<IActionResult> GetUserByEmail([FromRoute] string email, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.GetUserByEmail(email, cancellationToken).ConfigureAwait(false); |             var result = await service.GetUserByEmail(email, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -127,8 +127,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpPost(Routes.Register)] |         [HttpPost(Routes.Register)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status201Created)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status201Created)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> CreateUserAsync([FromBody] UserRequest newUser, CancellationToken cancellationToken) |         public async Task<IActionResult> CreateUserAsync([FromBody] UserRequest newUser, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.CreateUser(newUser, cancellationToken).ConfigureAwait(false); |             var result = await service.CreateUser(newUser, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -148,8 +148,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPut] |         [HttpPut] | ||||||
|         [Route(Routes.Id)] |         [Route(Routes.Id)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> UpdateUserAsync([FromRoute] string id, [FromBody] UserAdapter entity, CancellationToken cancellationToken) |         public async Task<IActionResult> UpdateUserAsync([FromRoute] string id, [FromBody] UserAdapter entity, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             if (id != entity.Id?.ToString()) |             if (id != entity.Id?.ToString()) | ||||||
| @@ -173,7 +173,7 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpPatch(Routes.LogIn)] |         [HttpPatch(Routes.LogIn)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.GoogleScheme}")] |         //[Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.AzureScheme}")] | ||||||
|         public async Task<IActionResult> LoginUserAsync([FromRoute] string email, CancellationToken cancellationToken) |         public async Task<IActionResult> LoginUserAsync([FromRoute] string email, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.LogInUser(email, cancellationToken).ConfigureAwait(false); |             var result = await service.LogInUser(email, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -194,7 +194,7 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         /// <response code="500">The service internal error.</response> |         /// <response code="500">The service internal error.</response> | ||||||
|         [HttpPatch(Routes.LogOut)] |         [HttpPatch(Routes.LogOut)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.GoogleScheme}")] |         //[Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.AzureScheme}")] | ||||||
|         public async Task<IActionResult> LogOutUserSessionAsync([FromRoute] string email, CancellationToken cancellationToken) |         public async Task<IActionResult> LogOutUserSessionAsync([FromRoute] string email, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.LogOutUserSession(email, cancellationToken).ConfigureAwait(false); |             var result = await service.LogOutUserSession(email, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -216,8 +216,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPatch] |         [HttpPatch] | ||||||
|         [Route(Routes.ChangeStatus)] |         [Route(Routes.ChangeStatus)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> ChangeUserStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) |         public async Task<IActionResult> ChangeUserStatus([FromRoute] string id, [FromRoute] StatusEnum newStatus, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.ChangeUserStatus(id, newStatus, cancellationToken).ConfigureAwait(false); |             var result = await service.ChangeUserStatus(id, newStatus, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -236,8 +236,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         [Route(Routes.AddCompany)] |         [Route(Routes.AddCompany)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> AddCompanyToUserAsync([FromRoute] string userId, [FromRoute] string companyId, CancellationToken cancellationToken) |         public async Task<IActionResult> AddCompanyToUserAsync([FromRoute] string userId, [FromRoute] string companyId, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.AddCompanyToUser(userId, companyId, cancellationToken).ConfigureAwait(false); |             var result = await service.AddCompanyToUser(userId, companyId, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -256,8 +256,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpDelete] |         [HttpDelete] | ||||||
|         [Route(Routes.RemoveCompany)] |         [Route(Routes.RemoveCompany)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> RemoveCompanyFromUserAsync([FromRoute] string userId, [FromRoute] string companyId, CancellationToken cancellationToken) |         public async Task<IActionResult> RemoveCompanyFromUserAsync([FromRoute] string userId, [FromRoute] string companyId, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.RemoveCompanyFromUser(userId, companyId, cancellationToken).ConfigureAwait(false); ; |             var result = await service.RemoveCompanyFromUser(userId, companyId, cancellationToken).ConfigureAwait(false); ; | ||||||
| @@ -276,8 +276,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         [Route(Routes.AddProject)] |         [Route(Routes.AddProject)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> AddProjectToUserAsync([FromRoute] string userId, [FromRoute] string projectId, CancellationToken cancellationToken) |         public async Task<IActionResult> AddProjectToUserAsync([FromRoute] string userId, [FromRoute] string projectId, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.AddProjectToUser(userId, projectId, cancellationToken).ConfigureAwait(false); |             var result = await service.AddProjectToUser(userId, projectId, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -296,8 +296,8 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpDelete] |         [HttpDelete] | ||||||
|         [Route(Routes.RemoveProject)] |         [Route(Routes.RemoveProject)] | ||||||
|         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(UserAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] |         //[Authorize(AuthenticationSchemes = Schemes.DefaultScheme)] | ||||||
|         [Permission("UserManagement.Write")] |         //[Permission("UserManagement.Write")] | ||||||
|         public async Task<IActionResult> RemoveProjectFromUserAsync([FromRoute] string userId, [FromRoute] string projectId, CancellationToken cancellationToken) |         public async Task<IActionResult> RemoveProjectFromUserAsync([FromRoute] string userId, [FromRoute] string projectId, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var result = await service.RemoveProjectFromUser(userId, projectId, cancellationToken).ConfigureAwait(false); |             var result = await service.RemoveProjectFromUser(userId, projectId, cancellationToken).ConfigureAwait(false); | ||||||
| @@ -315,7 +315,7 @@ namespace LSA.Core.Thalos.API.Controllers | |||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         [Route("{email}/GetTokenAdapter")] |         [Route("{email}/GetTokenAdapter")] | ||||||
|         [ProducesResponseType(typeof(TokenAdapter), StatusCodes.Status200OK)] |         [ProducesResponseType(typeof(TokenAdapter), StatusCodes.Status200OK)] | ||||||
|         [Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.GoogleScheme}")] |         //[Authorize(AuthenticationSchemes = $"{Schemes.DefaultScheme}, {Schemes.AzureScheme}")] | ||||||
|         public async Task<IActionResult> GetTokenAdapter([FromRoute] string email, CancellationToken cancellationToken) |         public async Task<IActionResult> GetTokenAdapter([FromRoute] string email, CancellationToken cancellationToken) | ||||||
|         { |         { | ||||||
|             var tokenAdapter = await service.GetToken(email, cancellationToken).ConfigureAwait(false); |             var tokenAdapter = await service.GetToken(email, cancellationToken).ConfigureAwait(false); | ||||||
|   | |||||||
| @@ -1,8 +1,6 @@ | |||||||
| using Asp.Versioning.ApiExplorer; | using Asp.Versioning.ApiExplorer; | ||||||
| using Microsoft.Extensions.Options; | using Microsoft.Extensions.Options; | ||||||
| using Microsoft.Graph.ExternalConnectors; |  | ||||||
| using Microsoft.OpenApi.Any; | using Microsoft.OpenApi.Any; | ||||||
| using Microsoft.OpenApi.Models; |  | ||||||
| using Swashbuckle.AspNetCore.SwaggerGen; | using Swashbuckle.AspNetCore.SwaggerGen; | ||||||
| using Swashbuckle.AspNetCore.SwaggerUI; | using Swashbuckle.AspNetCore.SwaggerUI; | ||||||
|  |  | ||||||
| @@ -10,44 +8,13 @@ namespace Core.Thalos.DAL.API.Extensions | |||||||
| { | { | ||||||
|     public static class SwaggerExtensions |     public static class SwaggerExtensions | ||||||
|     { |     { | ||||||
|         public static void AddSwagger(this IServiceCollection services, IConfiguration configuration) |         public static void AddSwagger(this IServiceCollection services) | ||||||
|         { |         { | ||||||
|             services.AddEndpointsApiExplorer(); |             services.AddEndpointsApiExplorer(); | ||||||
|             AddSwaggerGen(services, configuration); |             services.AddSwaggerGen(); | ||||||
|             services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>(); |             services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public static void AddSwaggerGen(this IServiceCollection services, IConfiguration configuration) |  | ||||||
|         { |  | ||||||
|             services.AddSwaggerGen(c => |  | ||||||
|             { |  | ||||||
|                 c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme |  | ||||||
|                 { |  | ||||||
|                     Description = "JWT Authorization header using the Bearer scheme", |  | ||||||
|                     Name = "Authorization", |  | ||||||
|                     In = ParameterLocation.Header, |  | ||||||
|                     Type = SecuritySchemeType.Http, |  | ||||||
|                     Scheme = "bearer", |  | ||||||
|                     BearerFormat = "JWT" |  | ||||||
|                 }); |  | ||||||
|  |  | ||||||
|                 c.AddSecurityRequirement(new OpenApiSecurityRequirement |  | ||||||
|                 { |  | ||||||
|                     { |  | ||||||
|                         new OpenApiSecurityScheme |  | ||||||
|                         { |  | ||||||
|                             Reference = new OpenApiReference |  | ||||||
|                             { |  | ||||||
|                                 Type = ReferenceType.SecurityScheme, |  | ||||||
|                                 Id = "Bearer" |  | ||||||
|                             } |  | ||||||
|                         }, |  | ||||||
|                         Array.Empty<string>() |  | ||||||
|                     } |  | ||||||
|                 }); |  | ||||||
|             }); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         public static void ConfigureSwagger(this WebApplication app) |         public static void ConfigureSwagger(this WebApplication app) | ||||||
|         { |         { | ||||||
|             app.UseSwagger(); |             app.UseSwagger(); | ||||||
|   | |||||||
| @@ -2,7 +2,6 @@ using Core.Blueprint.DAL.Mongo.Configuration; | |||||||
| using Core.Blueprint.Logging.Configuration; | using Core.Blueprint.Logging.Configuration; | ||||||
| using Core.Blueprint.Redis.Configuration; | using Core.Blueprint.Redis.Configuration; | ||||||
| using Core.Thalos.Adapters.Extensions; | using Core.Thalos.Adapters.Extensions; | ||||||
| using Core.Thalos.BuildingBlocks.Authentication.Extensions; |  | ||||||
| using Core.Thalos.DAL.API.Extensions; | using Core.Thalos.DAL.API.Extensions; | ||||||
| using Core.Thalos.Provider; | using Core.Thalos.Provider; | ||||||
| using Microsoft.AspNetCore.HttpLogging; | using Microsoft.AspNetCore.HttpLogging; | ||||||
| @@ -11,8 +10,6 @@ using System.Text.Json.Serialization; | |||||||
|  |  | ||||||
| var builder = WebApplication.CreateBuilder(args); | var builder = WebApplication.CreateBuilder(args); | ||||||
|  |  | ||||||
| builder.Services.ConfigureAuthentication(builder.Configuration); |  | ||||||
|  |  | ||||||
| builder.Services.AddEndpointsApiExplorer(); | builder.Services.AddEndpointsApiExplorer(); | ||||||
| builder.Services.AddSwaggerGen(); | builder.Services.AddSwaggerGen(); | ||||||
| builder.Configuration | builder.Configuration | ||||||
| @@ -48,7 +45,7 @@ builder.Host.ConfigureServices((context, services) => | |||||||
|     services |     services | ||||||
|         .AddEndpointsApiExplorer() |         .AddEndpointsApiExplorer() | ||||||
|         .AddVersioning() |         .AddVersioning() | ||||||
|         .AddSwagger(builder.Configuration); |         .AddSwagger(); | ||||||
|  |  | ||||||
|     services.AddHealthChecks(); |     services.AddHealthChecks(); | ||||||
|     services.AddHttpLogging(options => options.LoggingFields = HttpLoggingFields.All); |     services.AddHttpLogging(options => options.LoggingFields = HttpLoggingFields.All); | ||||||
| @@ -68,6 +65,8 @@ var app = builder.Build(); | |||||||
|  |  | ||||||
| app.UseSwagger(); | app.UseSwagger(); | ||||||
| app.UseSwaggerUI(); | app.UseSwaggerUI(); | ||||||
|  | app.UseAuthentication(); | ||||||
|  | app.UseAuthorization(); | ||||||
| app.MapControllers(); | app.MapControllers(); | ||||||
| app.UseCors(); | app.UseCors(); | ||||||
| app.ConfigureSwagger(); | app.ConfigureSwagger(); | ||||||
| @@ -77,8 +76,6 @@ app.UseRouting(); | |||||||
| app.UseResponseCompression(); | app.UseResponseCompression(); | ||||||
| app.UseOutputCache(); | app.UseOutputCache(); | ||||||
| app.UseResponseCaching(); | app.UseResponseCaching(); | ||||||
| app.UseAuthentication(); |  | ||||||
| app.UseAuthorization(); |  | ||||||
| app.UseLogging(builder.Configuration); | app.UseLogging(builder.Configuration); | ||||||
| app.MapHealthChecks("/health"); | app.MapHealthChecks("/health"); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,18 +18,5 @@ | |||||||
|   "UseRedisCache": true, |   "UseRedisCache": true, | ||||||
|   "CacheSettings": { |   "CacheSettings": { | ||||||
|     "DefaultCacheDurationInMinutes": 3 |     "DefaultCacheDurationInMinutes": 3 | ||||||
|   }, |   } | ||||||
|   "Authentication": { |  | ||||||
|     "Google": { |  | ||||||
|       "ClientId": "128345072002-mtfdgpcur44o9tbd7q6e0bb9qnp2crfp.apps.googleusercontent.com", |  | ||||||
|       "ClientSecret": "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", |  | ||||||
|       "ApplicationName": "Thalos", |  | ||||||
|       "RedirectUri": "https://localhost:7239/api/v1/Authentication/callback" |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   "JwtIssuerOptions": { |  | ||||||
|     "Audience": "https://localhost:7239/", |  | ||||||
|     "Issuer": "webApi" |  | ||||||
|   }, |  | ||||||
|   "SecretKey": "iNivDmHLpUA223sqsfhqGbMRdRj1PVkH1" |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Core.Thalos.BuildingBlocks" Version="1.0.5" /> |     <PackageReference Include="Core.Thalos.BuildingBlocks" Version="1.0.3" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|  |  | ||||||
| </Project> | </Project> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user