I was wondering whether it would be possiple to add security definitions to the swagger document based on the Ocelot configuration.
I had a brief look at the code, and I wanted to get your opinion before I maybe make a pr.
My idea was to, first provide a dictionary in OcelotSwaggerGenOptions, between Ocelot's AuthenticationOptions.AuthenticationProviderKey and Swagger's securitySchemes. Than when rewriting the routes, check wheter any AuthenticationProviderKey was set, if so, add a security definition to the endpoint with the corresponding securityScheme from the provided dictionary. And finally even scopes could be added from the AuthenticationOptions.AllowedScopes property.
Hi!
I was wondering whether it would be possiple to add security definitions to the swagger document based on the Ocelot configuration. I had a brief look at the code, and I wanted to get your opinion before I maybe make a pr.
My idea was to, first provide a dictionary in OcelotSwaggerGenOptions, between Ocelot's AuthenticationOptions.AuthenticationProviderKey and Swagger's securitySchemes. Than when rewriting the routes, check wheter any AuthenticationProviderKey was set, if so, add a security definition to the endpoint with the corresponding securityScheme from the provided dictionary. And finally even scopes could be added from the AuthenticationOptions.AllowedScopes property.
Thank You