mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-14 13:52:01 +02:00
fix(importer-postman): stop swapping the API key name and its value (#643)
This commit is contained in:
@@ -294,8 +294,10 @@ function importAuth(rawAuth: unknown): Pick<HttpRequest, "authentication" | "aut
|
|||||||
authenticationType: "apikey",
|
authenticationType: "apikey",
|
||||||
authentication: {
|
authentication: {
|
||||||
location: a.in === "query" ? "query" : "header",
|
location: a.in === "query" ? "query" : "header",
|
||||||
key: a.value != null ? String(a.value) : undefined,
|
// Postman's "key" is the header/parameter name and its "value" is the
|
||||||
value: a.key != null ? String(a.key) : undefined,
|
// secret, matching Yaak's own apikey auth.
|
||||||
|
key: a.key != null ? String(a.key) : undefined,
|
||||||
|
value: a.value != null ? String(a.value) : undefined,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -659,12 +659,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "value",
|
"key": "value",
|
||||||
"value": "value",
|
"value": "secret-123",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "key",
|
"key": "key",
|
||||||
"value": "key",
|
"value": "X-API-Key",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -271,8 +271,8 @@
|
|||||||
"authenticationType": "apikey",
|
"authenticationType": "apikey",
|
||||||
"authentication": {
|
"authentication": {
|
||||||
"location": "query",
|
"location": "query",
|
||||||
"key": "value",
|
"key": "X-API-Key",
|
||||||
"value": "key"
|
"value": "secret-123"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user