mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Passkeys: Allow nfc and usb transports
This commit is contained in:
parent
35fdcfa28d
commit
d5e6f394b7
@ -43,7 +43,9 @@ const QString BrowserPasskeys::AAGUID = QStringLiteral("fdb141b25d84443e8a354698
|
|||||||
// Authenticator capabilities
|
// Authenticator capabilities
|
||||||
const QString BrowserPasskeys::ATTACHMENT_CROSS_PLATFORM = QStringLiteral("cross-platform");
|
const QString BrowserPasskeys::ATTACHMENT_CROSS_PLATFORM = QStringLiteral("cross-platform");
|
||||||
const QString BrowserPasskeys::ATTACHMENT_PLATFORM = QStringLiteral("platform");
|
const QString BrowserPasskeys::ATTACHMENT_PLATFORM = QStringLiteral("platform");
|
||||||
const QString BrowserPasskeys::AUTHENTICATOR_TRANSPORT = QStringLiteral("internal");
|
const QString BrowserPasskeys::AUTHENTICATOR_TRANSPORT_INTERNAL = QStringLiteral("internal");
|
||||||
|
const QString BrowserPasskeys::AUTHENTICATOR_TRANSPORT_NFC = QStringLiteral("nfc");
|
||||||
|
const QString BrowserPasskeys::AUTHENTICATOR_TRANSPORT_USB = QStringLiteral("usb");
|
||||||
const bool BrowserPasskeys::SUPPORT_RESIDENT_KEYS = true;
|
const bool BrowserPasskeys::SUPPORT_RESIDENT_KEYS = true;
|
||||||
const bool BrowserPasskeys::SUPPORT_USER_VERIFICATION = true;
|
const bool BrowserPasskeys::SUPPORT_USER_VERIFICATION = true;
|
||||||
|
|
||||||
|
@ -91,7 +91,9 @@ public:
|
|||||||
|
|
||||||
static const QString ATTACHMENT_CROSS_PLATFORM;
|
static const QString ATTACHMENT_CROSS_PLATFORM;
|
||||||
static const QString ATTACHMENT_PLATFORM;
|
static const QString ATTACHMENT_PLATFORM;
|
||||||
static const QString AUTHENTICATOR_TRANSPORT;
|
static const QString AUTHENTICATOR_TRANSPORT_INTERNAL;
|
||||||
|
static const QString AUTHENTICATOR_TRANSPORT_NFC;
|
||||||
|
static const QString AUTHENTICATOR_TRANSPORT_USB;
|
||||||
static const bool SUPPORT_RESIDENT_KEYS;
|
static const bool SUPPORT_RESIDENT_KEYS;
|
||||||
static const bool SUPPORT_USER_VERIFICATION;
|
static const bool SUPPORT_USER_VERIFICATION;
|
||||||
|
|
||||||
|
@ -340,8 +340,10 @@ QStringList PasskeyUtils::getAllowedCredentialsFromAssertionOptions(const QJsonO
|
|||||||
const auto cred = credential.toObject();
|
const auto cred = credential.toObject();
|
||||||
const auto id = cred["id"].toString();
|
const auto id = cred["id"].toString();
|
||||||
const auto transports = cred["transports"].toArray();
|
const auto transports = cred["transports"].toArray();
|
||||||
const auto hasSupportedTransport =
|
const auto hasSupportedTransport = transports.isEmpty()
|
||||||
transports.isEmpty() || transports.contains(BrowserPasskeys::AUTHENTICATOR_TRANSPORT);
|
|| (transports.contains(BrowserPasskeys::AUTHENTICATOR_TRANSPORT_INTERNAL)
|
||||||
|
|| transports.contains(BrowserPasskeys::AUTHENTICATOR_TRANSPORT_NFC)
|
||||||
|
|| transports.contains(BrowserPasskeys::AUTHENTICATOR_TRANSPORT_USB));
|
||||||
|
|
||||||
if (cred["type"].toString() == BrowserPasskeys::PUBLIC_KEY && hasSupportedTransport && !id.isEmpty()) {
|
if (cred["type"].toString() == BrowserPasskeys::PUBLIC_KEY && hasSupportedTransport && !id.isEmpty()) {
|
||||||
allowedCredentials << id;
|
allowedCredentials << id;
|
||||||
|
Loading…
Reference in New Issue
Block a user