-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenIdConnect and cookie #1321
Comments
ATM auth support is limited, but you can add the required settings in PostProcess or with an own processor: https://github.com/RSuter/NSwag/wiki/Document-Processors-and-Operation-Processors |
The answer before is just to change the spec for your needs. Maybe we also have to add more settings to configure the Swagger UI for that..., |
I think I'll spend some time into NSwag and see how far I can get with it. With "we" you mean that there is no own processor or custom html template to use as override as in "me" to do so in the UI? :) |
There is a processor to add scopes: But there is not processor to add auth infos except this one (Swagger 2.0 only?): https://github.com/RSuter/NSwag/blob/master/src/NSwag.SwaggerGeneration/Processors/Security/SecurityDefinitionAppender.cs And maybe we have to add more UI configuration settings: https://github.com/RSuter/NSwag/blob/master/src/NSwag.AspNetCore/SwaggerUi3Settings.cs#L36 |
I'm not sure if the cookie authentication even works on swagger-ui by OAS v3 itself looking at this issue swagger-api/swagger-js#1163 |
#As of OpenAPI Specification 3.0 it is possible to use more authentication methods, in ASP.NET Core it is easy to AddAuthentication with OpenIdConnect and AddCookie. As swashbuckle is not supporting 3.0 I'm looking at NSwag. Is it possible to use NSwag and use cookie-authentication?
https://swagger.io/docs/specification/authentication/
https://swagger.io/docs/specification/authentication/cookie-authentication/
and use OpenIdConnect discovery?
https://swagger.io/docs/specification/authentication/openid-connect-discovery/
The text was updated successfully, but these errors were encountered: