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

Doesn't it support setting up authentication for cookies? #256

Open
sehee-gwon opened this issue Jan 5, 2024 · 0 comments
Open

Doesn't it support setting up authentication for cookies? #256

sehee-gwon opened this issue Jan 5, 2024 · 0 comments

Comments

@sehee-gwon
Copy link

sehee-gwon commented Jan 5, 2024

Hi. I'm using restdoc mockmvc + swagger-ui.

I'm using openapi 3.0.1 and need to set securitySchemes.
Looking at the code, it seems that the SecurityRequirementsHandler is affecting the creation of the securityRequirements field.

Looking at your code, it seems to only support 'Basic' and 'Bearer' authentication using the Authorization property of the Header.

Could you please add Cookie authorization here as well?
In the end, the Open API form you want to convert looks like this

components:
  securitySchemes:
    cookieAuth:         # arbitrary name for the security scheme; will be used in the "security" key later
      type: apiKey
      in: cookie
      name: JSESSIONID  # cookie name

P.S. This post is written with a translator. Please forgive me if the sentences are not smooth.

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

No branches or pull requests

1 participant