Skip to content
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

Open
rfcdejong opened this issue May 15, 2018 · 5 comments
Open

OpenIdConnect and cookie #1321

rfcdejong opened this issue May 15, 2018 · 5 comments

Comments

@rfcdejong
Copy link

rfcdejong commented May 15, 2018

#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/

@RicoSuter
Copy link
Owner

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

@RicoSuter
Copy link
Owner

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...,

@rfcdejong
Copy link
Author

rfcdejong commented May 15, 2018

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? :)

@RicoSuter
Copy link
Owner

RicoSuter commented May 15, 2018

@rfcdejong
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants