Contratos y afiliados (nuevas rutas), ms prueba ping

This commit is contained in:
luismd98 2022-12-09 16:20:17 -05:00
parent f2efc96945
commit da19375940
8 changed files with 239 additions and 7 deletions

View File

@ -29,9 +29,10 @@ var pipeConfig = new OcelotPipelineConfiguration
AuthorizationMiddleware = async (downStreamContext, next) =>
{
var _bearer_token = downStreamContext.Request.Headers[HeaderNames.Authorization].ToString();
//string date = DateTime.Now.ToString();
logger.LogInformation("Bearer :");
logger.LogInformation(_bearer_token);
//logger.LogInformation("Bearer :");
//logger.LogInformation(_bearer_token);
bool isAuthorized = CustomLogic.Authorize(downStreamContext);
if (isAuthorized)

View File

@ -1,5 +1,17 @@
{
"SwaggerEndPoints": [
{
"Key": "MsPing",
"TransformByOcelotConfig": true,
"Config": [
{
"Name": "MsPing",
"Version": "1.0",
"Url": "http://localhost:8198/api/swagger/v1/swagger.json"
}
]
},
{
"Key": "ApiGetway",
"TransformByOcelotConfig": false,

View File

@ -360,9 +360,166 @@
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/MotivosNovedades",
"UpstreamHttpMethod": [ "Get" ],
"DownstreamPathTemplate": "/MotivosNovedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/MotivosNovedades",
"UpstreamHttpMethod": [ "POST" ],
"DownstreamPathTemplate": "/MotivosNovedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/Novedades",
"UpstreamHttpMethod": [ "GET" ],
"DownstreamPathTemplate": "/Novedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/Novedades",
"UpstreamHttpMethod": [ "POST" ],
"DownstreamPathTemplate": "/Novedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/Novedades",
"UpstreamHttpMethod": [ "PATCH" ],
"DownstreamPathTemplate": "/Novedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/Novedades/EditarLeido",
"UpstreamHttpMethod": [ "PATCH" ],
"DownstreamPathTemplate": "/Novedades/EditarLeido",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/TiposNovedades",
"UpstreamHttpMethod": [ "GET" ],
"DownstreamPathTemplate": "/TiposNovedades",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/TiposMotivos",
"UpstreamHttpMethod": [ "GET" ],
"DownstreamPathTemplate": "/TiposMotivos",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
},
{
"SwaggerKey": "Afiliados",
"UpstreamPathTemplate": "/TiposMotivos",
"UpstreamHttpMethod": [ "Post" ],
"DownstreamPathTemplate": "/TiposMotivos",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8145
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
}
]

View File

@ -180,6 +180,24 @@
"GET"
]
},
{
"SwaggerKey": "MsContratos",
"UpstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
"DownstreamPathTemplate": "/CapCTTPorCTT/FechaBloqueo",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8149
}
],
"RouteClaimsRequirement": {
"permisos": "any"
},
"UpstreamHttpMethod": [
"GET"
]
},
{
"SwaggerKey": "MsContratos",
"UpstreamPathTemplate": "/CapCTTPorCTT",
@ -396,6 +414,24 @@
"PATCH"
]
},
{
"SwaggerKey": "MsContratos",
"UpstreamPathTemplate": "/Convenios",
"DownstreamPathTemplate": "/Convenios",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8149
}
],
"RouteClaimsRequirement": {
"permisos": "any"
},
"UpstreamHttpMethod": [
"PATCH"
]
},
{
"SwaggerKey": "MsContratos",
"UpstreamPathTemplate": "/Convenios",

View File

@ -1,9 +1,9 @@
{
"GlobalConfiguration": {
//"BaseUrl": "https://localhost:8021",
"RateLimitOptions": {
"QuotaExceededMessage": "Request excedidos",
"HttpStatusCode": 909 //429 default
}
//"RateLimitOptions": {
// "QuotaExceededMessage": "Request excedidos",
// "HttpStatusCode": 909 //429 default
//}
}
}

View File

@ -0,0 +1,24 @@
{
"Routes": [
{
"SwaggerKey": "MsPing",
"UpstreamPathTemplate": "/Ping",
"UpstreamHttpMethod": [ "GET", "POST", "PATCH" ],
"DownstreamPathTemplate": "/Ping",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8198
}
],
"RouteClaimsRequirement": {
"permisos": "any"
}
}
]
}

View File

@ -2,6 +2,8 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"System": "Information",
"Microsoft": "Information",
"Microsoft.AspNetCore": "Warning"
}
},

File diff suppressed because one or more lines are too long