Burgyn / MMLib.SwaggerForOcelot

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

How to set OAuthClientId on version 6? #253

Closed sirdawidd closed 1 year ago

sirdawidd commented 1 year ago

Hello On version 5.2.0 there was possibility to set OAuthClientId Option is no more available in the version 6.

app.UseSwaggerForOcelotUI(options =>
        { 
            options.OAuthClientId(swaggerSettings.ClientId);
            options.OAuthUsePkce();
        });
Burgyn commented 1 year ago

Hi,

from version 6.0.0 has UseSwaggerForOcelotUI method new overload with Action<SwaggerUIOptions> setupUiAction = null parameter.

app.UseSwaggerForOcelotUI(opt =>
  {
      opt.DownstreamSwaggerHeaders = new[]
      {
          new KeyValuePair<string, string>("Key", "Value"),
          new KeyValuePair<string, string>("Key2", "Value2"),
      };
  }, c =>
  {
      c.OAuthConfigObject ...
  });
sirdawidd commented 1 year ago

Thanks!