diff --git a/.gitignore b/.gitignore index bd0d7a8..8a30d25 100644 --- a/.gitignore +++ b/.gitignore @@ -396,7 +396,3 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml - -#SettingsFiles -/appsettings.Production.json -#DAtaTests \ No newline at end of file diff --git a/Program.cs b/Program.cs index f707726..2bdf69a 100644 --- a/Program.cs +++ b/Program.cs @@ -41,10 +41,12 @@ } }); }); +/* builder.Services.AddCors(options => { options.AddPolicy("AllowOrigins", options => options.AllowAnyOrigin()); }); +*/ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => @@ -71,7 +73,7 @@ app.UseSwaggerUI(); app.UseHttpsRedirection(); -app.UseCors(); +//app.UseCors(); app.UseAuthentication(); app.UseAuthorization(); app.MapControllers(); diff --git a/appsettings.Production.json b/appsettings.Production.json new file mode 100644 index 0000000..c3980cc --- /dev/null +++ b/appsettings.Production.json @@ -0,0 +1,43 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "DefaultConnection": "" + }, + "CRED": { + "EmailIntA": "administrador@interno.com", + "PwdIntA": "35ffd846c3d5e1d44ee73a37a16d541bbb78f829e6c351a584934cad84ed9fb0", + "SaltIntA": "12345678900", + "EmailIntU": "usuario@interno.com", + "PwdIntU": "7da3c57c0d420776006a6cebe00141f182567842371e21707722928055062689", + "SaltIntU": "12345678901", + "EmailExtA": "administrador@externo.com", + "PwdExtA": "6c78da1c68e521a560d49739475dd9e243e291c617e6a67cc3ee2a5c041cff4e", + "SaltExtA": "12345678902", + "EmailExtU": "usuario@externo.com", + "PwdExtU": "17e434e1a6a31d0ad82d005fa6d631f386b1dc39e5ba1c89eaa4e70fefd64e69", + "SaltExtU": "12345678903" + }, + "Policy": { + "A": "AUTHORIZED" + }, + "JWT": { + "Key": "SecretKeyWithMoreThan40CharactersIntoTheContentToWorksWithSHA256", + "expirationToken": "30", //Define el tiempo en minutos en que los token generados estén vigentes + "Issuer": "http://zlomxauat01:8083/", + "Audience": "http://zlomxauat01:8083/" + }, + "Encrypt": { + "Key": "T6_u4qwePEMFk{Qm-*<7c,s:KH9gjyJV", + "Iv": "V]tr{+7SKQ~pxWFw" + }, + "SP": { + "Signup": "SP_Signup", + "Signin": "SP_Signin" + } +}