Forum Discussion

sdmuuu's avatar
sdmuuu
New Contributor
7 years ago

Should Cookie auth from swaggerhub.com ui work and if so, what am I don't wrong?

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

2 Replies

  • sdmuuu's avatar
    sdmuuu
    New Contributor

    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