Sending cookie session id with Swagger 3.0

后端 未结 1 1824
情歌与酒
情歌与酒 2020-12-02 02:34

It is said that \"To define cookie authentication, use API keys instead.\" in the official documentation

https://swagger.io/docs/specification/describing-parameters

相关标签:
1条回答
  • 2020-12-02 02:59

    Swagger UI and Swagger Editor currently do not support sending cookies in "try it out" requests:
    https://github.com/swagger-api/swagger-js/issues/1163

    As the developers explain, the issue is that it's almost impossible to send arbitrary cookie data to a different origin from within the browser.


    SwaggerHub supports cookie auth and cookie parameters though. SwaggerHub sends "try it out" requests from its servers rather than from your browser, which makes it possible to send requests with a user-defined Cookie header.

    Disclosure: I work for the company that makes SwaggerHub.

    0 讨论(0)
提交回复
热议问题