File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -1463,7 +1463,31 @@ operationToAuthorizationInfo operation =
14631463 |> CliMonad . succeed
14641464
14651465 OpenApi . SecurityScheme . Cookie ->
1466- CliMonad . todoWithDefault acc " Unsupported security schema: ApiKey in Cookie"
1466+ if Dict . member " Cookie" acc. headers then
1467+ CliMonad . todoWithDefault acc " Cookie header already set"
1468+
1469+ else
1470+ CliMonad . succeed
1471+ { acc
1472+ | headers =
1473+ Dict . insert " Cookie"
1474+ ( \ config ->
1475+ Elm . Op . append
1476+ ( Elm . string ( apiKey. name ++ " =" ))
1477+ ( config
1478+ |> Elm . get " authorization"
1479+ |> Elm . get cleanName
1480+ )
1481+ )
1482+ acc. headers
1483+ , params =
1484+ Dict . insert " authorization"
1485+ ( Dict . insert cleanName Elm . Annotation . string <|
1486+ Maybe . withDefault Dict . empty <|
1487+ Dict . get " authorization" acc. params
1488+ )
1489+ acc. params
1490+ }
14671491
14681492 OpenApi . SecurityScheme . Http details ->
14691493 case details. scheme of
You can’t perform that action at this time.
0 commit comments