Ocelot Authorization using Identity server #1933
Replies: 6 comments 2 replies
-
I suppose the actual Identity server backend/store is hosted in a seperate service? If this is the case, can you try the following, this is how we do this (also with IdentityServer hosted seperately): services.AddAuthentication()
.AddIdentityServerAuthentication("Bearer", options =>
{
options.Authority = Configuration["Authentication-Authority"];
options.RequireHttpsMetadata = true;
options.ApiName = "apigateway";
options.SupportedTokens = SupportedTokens.Both;
}); Don't forget to replace the |
Beta Was this translation helpful? Give feedback.
-
@Mortana89 Thank you for your quick response. I've modified the code according, but still getting the same error. Log[10:53:59 INF] Request starting HTTP/1.1 POST http://localhost:64021/api/MyService/test application/json 218 |
Beta Was this translation helpful? Give feedback.
-
@satishviswanathan I got the same issue. |
Beta Was this translation helpful? Give feedback.
-
@gilsdav not sure if the OP solved his issue, but another thing to check in this scenario is that the Identity Server token itself is valid, you can verify this by hitting the IdSrv introspection endpoint with your token, and checking the response. |
Beta Was this translation helpful? Give feedback.
-
@djrhodes I got a blazor app that is accessible under |
Beta Was this translation helpful? Give feedback.
-
It seems to only work with Bearer header so I used http://docs.identityserver.io/en/release/quickstarts/5_hybrid_and_api_access.html |
Beta Was this translation helpful? Give feedback.
-
Expected Behavior / New Feature
Authorize and forward the request to downstream server.
Actual Behavior / Motivation for New Feature
Ocelot configuration
Steps to Reproduce the Problem
StartUp.cs
I'm quite new to Ocelot and using identity server for authorization. Any help is highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions