Configura authentication and authorization
This commit is contained in:
		| @@ -1,10 +1,10 @@ | ||||
| using Asp.Versioning; | ||||
| using Azure.Identity; | ||||
| using Core.Blueprint.Logging.Configuration; | ||||
| using Core.Thalos.Adapters.Contracts; | ||||
| using Core.Thalos.Adapters.Extensions; | ||||
| using Core.Thalos.Adapters.Services; | ||||
| using Core.Thalos.BuildingBlocks.Authentication.Extensions; | ||||
| using Core.Thalos.External.ClientConfiguration; | ||||
| using Microsoft.AspNetCore.ResponseCompression; | ||||
| using Microsoft.Extensions.Configuration.AzureAppConfiguration; | ||||
| using OpenTelemetry.Logs; | ||||
| using OpenTelemetry.Resources; | ||||
| using Swashbuckle.AspNetCore.SwaggerUI; | ||||
| @@ -13,6 +13,8 @@ using System.Reflection; | ||||
|  | ||||
| var builder = WebApplication.CreateBuilder(args); | ||||
|  | ||||
| builder.Services.ConfigureAuthentication(builder.Configuration); | ||||
|  | ||||
| builder.Services.AddEndpointsApiExplorer(); | ||||
| builder.Configuration | ||||
|     .AddUserSecrets(Assembly.GetExecutingAssembly()) | ||||
| @@ -81,7 +83,7 @@ builder.Host.ConfigureServices((context, services) => | ||||
|     services.AddResponseCaching(); | ||||
|     services.AddControllers(); | ||||
|     services.AddEndpointsApiExplorer(); | ||||
|     services.AddSwaggerGen(); | ||||
|     services.AddSwaggerGen(builder.Configuration); | ||||
|     services.AddLogging(); | ||||
|     services.AddProblemDetails(); | ||||
|     services.AddHttpContextAccessor(); | ||||
| @@ -107,6 +109,8 @@ builder.Services.AddCors(options => | ||||
|         }); | ||||
| }); | ||||
|  | ||||
| builder.Services.AddScoped<ITokenService, TokenService>(); | ||||
|  | ||||
| //*************************************************************************// | ||||
| var app = builder.Build(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Oscar Morales
					Oscar Morales