Forum Discussion

kkallu's avatar
kkallu
New Member
4 years ago

Passing JWT token from Ocelot to downstream APi

I have configured swagger ui for all the microservices and the ocelot gateway. If I individually use microservice with JWT token it's working fine. But if I send the token from the Ocelet API gateway I'm getting a 404 error. Below is my ocelot API Json.

 

 

{
"Routes": [
{
"DownstreamPathTemplate": "/account/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": "5001"
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
"SwaggerKey": "accounts",
"AuthenticationProviderKey": "Bearer",
"AllowScopes": []

}
],
//"RateLimitOptions": {
// "ClientWhitelist": [],
// "EnableRateLimiting": true,
// "Period": "30m",
// "PeriodTimespan": 5,
// "Limit": 100
//},
"SwaggerEndPoints": [
{
"Key": "accounts",
"Config": [
{
"Name": "Accounts API",
"Version": "v1",
"Url": "https://localhost:5001/swagger/v1/swagger.json"
}
]
}
],
"GlobalConfiguration": {
"BaseUrl": "https://localhost:5021"
}
}

No RepliesBe the first to reply