mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 20:47:37 +03:00
Passkeys: Pass extension JSON data to browser (#10615)
This commit is contained in:
parent
880621c1fb
commit
5b123e7944
6 changed files with 51 additions and 11 deletions
|
@ -459,9 +459,9 @@ void TestPasskeys::testExtensions()
|
|||
auto result = passkeyUtils()->buildExtensionData(extensions);
|
||||
|
||||
BrowserCbor cbor;
|
||||
auto extensionJson = cbor.getJsonFromCborData(result);
|
||||
auto uvmArray = extensionJson["uvm"].toArray();
|
||||
QCOMPARE(extensionJson["credProps"].toObject()["rk"].toBool(), true);
|
||||
auto extensionJson = cbor.getJsonFromCborData(result.extensionData);
|
||||
auto uvmArray = result.extensionObject["uvm"].toArray();
|
||||
QCOMPARE(result.extensionObject["credProps"].toObject()["rk"].toBool(), true);
|
||||
QCOMPARE(uvmArray.size(), 1);
|
||||
QCOMPARE(uvmArray.first().toArray().size(), 3);
|
||||
|
||||
|
@ -470,10 +470,10 @@ void TestPasskeys::testExtensions()
|
|||
auto partialData = passkeyUtils()->buildExtensionData(partial);
|
||||
auto faultyData = passkeyUtils()->buildExtensionData(faulty);
|
||||
|
||||
auto partialJson = cbor.getJsonFromCborData(partialData);
|
||||
auto partialJson = cbor.getJsonFromCborData(partialData.extensionData);
|
||||
QCOMPARE(partialJson["uvm"].toArray().size(), 1);
|
||||
|
||||
auto faultyJson = cbor.getJsonFromCborData(faultyData);
|
||||
auto faultyJson = cbor.getJsonFromCborData(faultyData.extensionData);
|
||||
QCOMPARE(faultyJson.size(), 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue