зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1813778 - implement WebAuthn isConditionalMediationAvailable. r=keeler,webidl,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D188137
This commit is contained in:
Родитель
cf93dd51b7
Коммит
d15bfcf389
|
@ -145,6 +145,19 @@ PublicKeyCredential::IsUserVerifyingPlatformAuthenticatorAvailable(
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
/* static */
|
||||
already_AddRefed<Promise> PublicKeyCredential::IsConditionalMediationAvailable(
|
||||
GlobalObject& aGlobal, ErrorResult& aError) {
|
||||
RefPtr<Promise> promise =
|
||||
Promise::Create(xpc::CurrentNativeGlobal(aGlobal.Context()), aError);
|
||||
if (aError.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
// Support for conditional mediation will be added in Bug 1838932
|
||||
promise->MaybeResolve(false);
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
/* static */
|
||||
already_AddRefed<Promise>
|
||||
PublicKeyCredential::IsExternalCTAP2SecurityKeySupported(GlobalObject& aGlobal,
|
||||
|
|
|
@ -49,6 +49,9 @@ class PublicKeyCredential final : public Credential {
|
|||
IsUserVerifyingPlatformAuthenticatorAvailable(GlobalObject& aGlobal,
|
||||
ErrorResult& aError);
|
||||
|
||||
static already_AddRefed<Promise> IsConditionalMediationAvailable(
|
||||
GlobalObject& aGlobal, ErrorResult& aError);
|
||||
|
||||
static already_AddRefed<Promise> IsExternalCTAP2SecurityKeySupported(
|
||||
GlobalObject& aGlobal, ErrorResult& aError);
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ interface PublicKeyCredential : Credential {
|
|||
[SameObject, Throws] readonly attribute ArrayBuffer rawId;
|
||||
[SameObject] readonly attribute AuthenticatorResponse response;
|
||||
AuthenticationExtensionsClientOutputs getClientExtensionResults();
|
||||
[NewObject] static Promise<boolean> isConditionalMediationAvailable();
|
||||
[Throws] object toJSON();
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
[conditional-mediation.https.html]
|
||||
[Conditional mediation supported]
|
||||
expected: FAIL
|
||||
|
||||
[Conditional mediation not supported]
|
||||
expected: FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче