Burgyn / MMLib.SwaggerForOcelot

This repo contains swagger extension for ocelot.
MIT License
352 stars 94 forks source link

api scopes of gateway itself #220

Closed codehunter13 closed 2 years ago

codehunter13 commented 2 years ago

Hi,

Ive an api, protected by Scope 'RGG' My Ocelot frontend api is protected by scope "RGR"

Using swagger from the api itself works. At the login screen i can select the RGG scope and doing actual swagger calls. When using swagger from ocelot, at login i only can select the RGG scope. I dont see an RGR scope checkbox. Login works but doing actual calls give the error: Client has NOT been authenticated for /... and pipeline error set. Request for authenticated route /... by was unauthenticated and Audience validation failed. Audiences: 'RGG'. Did not match: validationParameters.ValidAudience: 'RGR' or validationParameters.ValidAudiences: 'null'.

Everything works fine from my real client as im passing the two scopes to Ocelot.

Is this a supported scenario and if so how do i solve this.

Thx in advance