You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.0info:
title: API Titledescription: API version: 0.1.0servers:
- url: http://example.comdescription: API serverpaths:
/api/user:
get:
summary: Get current user informationdescription: Get current user informationresponses:
'200':
description: Successcomponents:
securitySchemes:
cookieAuth:
type: apiKeyin: cookiename: tokendescription: access tokenschemas:
User:
type: objectrequired:
- id
- nameproperties:
id:
type: integerformat: int32description: User IDname:
type: stringdescription: User Namesecurity:
- cookieAuth: []
Expected Behavior
When I Click Authorize and input the string test|abc, then Click Try it out and Execute, it will request
curl -X GET "http://example.com/api/user" -H "accept: */*" -H "Cookie: token=test|abc"
Current Behavior
It requests
curl -X GET "http://example.com/api/user" -H "accept: */*" -H "Cookie: token=test%7Cabc"
Possible Solution
Don't quote or encode Cookie's value.
Context
My authorization token contains | and :, Swagger UI will encode them, so Try it out doesn't work for me.
Demonstration API definition
Expected Behavior
When I Click
Authorize
and input the stringtest|abc
, then ClickTry it out
andExecute
, it will requestCurrent Behavior
It requests
Possible Solution
Don't quote or encode Cookie's value.
Context
My authorization token contains
|
and:
, Swagger UI will encode them, soTry it out
doesn't work for me.rfc6265 declared that
So Cookie value should not be simply encoded or it will incorrectly escape character.
The text was updated successfully, but these errors were encountered: