Cannot pass JSON array in AddHeadersToRequest #693
Labels
feature
A new feature
help wanted
Not actively being worked on. If you plan to contribute, please drop a note.
needs feedback
Issue is waiting on feedback before acceptance
Expected Behavior / New Feature
I have the configuration for Ocelot as below -
{
"DownstreamPathTemplate": "/api/v{version}/users",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 7002
}
],
"UpstreamPathTemplate": "/v{version}/users",
"UpstreamHttpMethod": [ "Get", "Post", "Delete" ],
"AuthenticationOptions": {
"AuthenticationProviderKey": "Bearer",
"AllowedScopes": []
},
"AddHeadersToRequest": {
"name": "Claims[name] > value > |",
"role": "Claims[role] > value > |"
}
}
OAuth JWT -
{
"nbf": 1542628406,
"exp": 1542632006,
"iss": "http://localhost:7600",
"aud": [
"http://localhost:7600/resources",
"IdentityServer"
],
"client_id": "ImplicitClient",
"sub": "TestUser",
"auth_time": 1542627374,
"idp": "Google",
"name": "TestUser",
"role": [
"ix_role_eiaproject_admin",
"ix_role_assortment_admin",
"ix_role_cluster_admin",
"ix_role_floorplan_admin",
"ix_role_planogram_admin",
"ix_role_product_admin",
"ix_role_store_admin",
"ix_role_system_admin",
"ix_role_pronet_admin"
],
"scope": [
"IdentityServer"
],
"amr": [
"external"
]
}
When I extract the role header in the Web API, I only get one role. But then I am expecting all the roles in the header with the "AddHeadersToRequest" functionality.
The text was updated successfully, but these errors were encountered: