I'm trying to get cookie auth to work. I'm using OpenAPI 3.0.0 that has this support, however, it's not working with the swagger hub ui on swaggerhub.com. I have a login path that I don't include security on, and then following that requires the cookie that would have been sent in the login path. Here is the path that requires the cookie to be sent:
/user/info:
post:
security:
- SESSIONV2: []
operationId: getLoggedInUser
responses:
'200':
description: successful operation
content:
'*/*':
schema:
type: string
# And this in components:
components:
securitySchemes:
SESSIONV2:
type: apiKey
name: SESSIONV2
in: cookie
Hi,
There is an open feature request to send cookies with the SwaggerUI for version 3.x specs. When this is implemented you should be able to send cookies using the try it out feature.
https://github.com/swagger-api/swagger-ui/issues/2895
Regards,
Marcus
SmartBear Support
I'm not using SwaggerUI. I'm using the UI on app.swaggerhub.com. Or are you saying that site also uses SwaggerUI under the covers and it doesn't work yet?
It's strange to me since cookies work when I use the swaggerUI and data from a swagger maven plugin generated using annotations from our spring based code.
Shane
Subject | Author | Latest Post |
---|---|---|