mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-13 21:32:08 +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",
|
||||
authentication: {
|
||||
location: a.in === "query" ? "query" : "header",
|
||||
key: a.value != null ? String(a.value) : undefined,
|
||||
value: a.key != null ? String(a.key) : undefined,
|
||||
// Postman's "key" is the header/parameter name and its "value" is the
|
||||
// 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",
|
||||
"value": "value",
|
||||
"value": "secret-123",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "key",
|
||||
"value": "key",
|
||||
"value": "X-API-Key",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -271,8 +271,8 @@
|
||||
"authenticationType": "apikey",
|
||||
"authentication": {
|
||||
"location": "query",
|
||||
"key": "value",
|
||||
"value": "key"
|
||||
"key": "X-API-Key",
|
||||
"value": "secret-123"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user