summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/webauthn.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/interfaces/webauthn.idl
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/webauthn.idl')
-rw-r--r--testing/web-platform/tests/interfaces/webauthn.idl350
1 files changed, 350 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/webauthn.idl b/testing/web-platform/tests/interfaces/webauthn.idl
new file mode 100644
index 0000000000..c7f72eacfd
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/webauthn.idl
@@ -0,0 +1,350 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Web Authentication: An API for accessing Public Key Credentials - Level (https://w3c.github.io/webauthn/)
+
+[SecureContext, Exposed=Window]
+interface PublicKeyCredential : Credential {
+ [SameObject] readonly attribute ArrayBuffer rawId;
+ [SameObject] readonly attribute AuthenticatorResponse response;
+ [SameObject] readonly attribute DOMString? authenticatorAttachment;
+ AuthenticationExtensionsClientOutputs getClientExtensionResults();
+ static Promise<boolean> isConditionalMediationAvailable();
+ PublicKeyCredentialJSON toJSON();
+};
+
+typedef DOMString Base64URLString;
+typedef (RegistrationResponseJSON or AuthenticationResponseJSON) PublicKeyCredentialJSON;
+
+dictionary RegistrationResponseJSON {
+ Base64URLString id;
+ Base64URLString rawId;
+ AuthenticatorAttestationResponseJSON response;
+ DOMString? authenticatorAttachment;
+ AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
+ DOMString type;
+};
+
+dictionary AuthenticatorAttestationResponseJSON {
+ Base64URLString clientDataJSON;
+ Base64URLString attestationObject;
+ sequence<DOMString> transports;
+};
+
+dictionary AuthenticationResponseJSON {
+ Base64URLString id;
+ Base64URLString rawId;
+ AuthenticatorAssertionResponseJSON response;
+ DOMString? authenticatorAttachment;
+ AuthenticationExtensionsClientOutputsJSON clientExtensionResults;
+ DOMString type;
+};
+
+dictionary AuthenticatorAssertionResponseJSON {
+ Base64URLString clientDataJSON;
+ Base64URLString authenticatorData;
+ Base64URLString signature;
+ Base64URLString? userHandle;
+};
+
+dictionary AuthenticationExtensionsClientOutputsJSON {
+};
+
+partial dictionary CredentialCreationOptions {
+ PublicKeyCredentialCreationOptions publicKey;
+};
+
+partial dictionary CredentialRequestOptions {
+ PublicKeyCredentialRequestOptions publicKey;
+};
+
+partial interface PublicKeyCredential {
+ static Promise<boolean> isUserVerifyingPlatformAuthenticatorAvailable();
+};
+
+partial interface PublicKeyCredential {
+ static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options);
+};
+
+dictionary PublicKeyCredentialCreationOptionsJSON {
+ required PublicKeyCredentialRpEntity rp;
+ required PublicKeyCredentialUserEntityJSON user;
+ required Base64URLString challenge;
+ required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
+ unsigned long timeout;
+ sequence<PublicKeyCredentialDescriptorJSON> excludeCredentials = [];
+ AuthenticatorSelectionCriteria authenticatorSelection;
+ DOMString attestation = "none";
+ AuthenticationExtensionsClientInputsJSON extensions;
+};
+
+dictionary PublicKeyCredentialUserEntityJSON {
+ required Base64URLString id;
+ required DOMString name;
+ required DOMString displayName;
+};
+
+dictionary PublicKeyCredentialDescriptorJSON {
+ required Base64URLString id;
+ required DOMString type;
+ sequence<DOMString> transports;
+};
+
+dictionary AuthenticationExtensionsClientInputsJSON {
+};
+
+partial interface PublicKeyCredential {
+ static PublicKeyCredentialRequestOptions parseRequestOptionsFromJSON(PublicKeyCredentialRequestOptionsJSON options);
+};
+
+dictionary PublicKeyCredentialRequestOptionsJSON {
+ required Base64URLString challenge;
+ unsigned long timeout;
+ DOMString rpId;
+ sequence<PublicKeyCredentialDescriptorJSON> allowCredentials = [];
+ DOMString userVerification = "preferred";
+ AuthenticationExtensionsClientInputsJSON extensions;
+};
+
+[SecureContext, Exposed=Window]
+interface AuthenticatorResponse {
+ [SameObject] readonly attribute ArrayBuffer clientDataJSON;
+};
+
+[SecureContext, Exposed=Window]
+interface AuthenticatorAttestationResponse : AuthenticatorResponse {
+ [SameObject] readonly attribute ArrayBuffer attestationObject;
+ sequence<DOMString> getTransports();
+ ArrayBuffer getAuthenticatorData();
+ ArrayBuffer? getPublicKey();
+ COSEAlgorithmIdentifier getPublicKeyAlgorithm();
+};
+
+[SecureContext, Exposed=Window]
+interface AuthenticatorAssertionResponse : AuthenticatorResponse {
+ [SameObject] readonly attribute ArrayBuffer authenticatorData;
+ [SameObject] readonly attribute ArrayBuffer signature;
+ [SameObject] readonly attribute ArrayBuffer? userHandle;
+ [SameObject] readonly attribute ArrayBuffer? attestationObject;
+};
+
+dictionary PublicKeyCredentialParameters {
+ required DOMString type;
+ required COSEAlgorithmIdentifier alg;
+};
+
+dictionary PublicKeyCredentialCreationOptions {
+ required PublicKeyCredentialRpEntity rp;
+ required PublicKeyCredentialUserEntity user;
+
+ required BufferSource challenge;
+ required sequence<PublicKeyCredentialParameters> pubKeyCredParams;
+
+ unsigned long timeout;
+ sequence<PublicKeyCredentialDescriptor> excludeCredentials = [];
+ AuthenticatorSelectionCriteria authenticatorSelection;
+ DOMString attestation = "none";
+ sequence<DOMString> attestationFormats = [];
+ AuthenticationExtensionsClientInputs extensions;
+};
+
+dictionary PublicKeyCredentialEntity {
+ required DOMString name;
+};
+
+dictionary PublicKeyCredentialRpEntity : PublicKeyCredentialEntity {
+ DOMString id;
+};
+
+dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity {
+ required BufferSource id;
+ required DOMString displayName;
+};
+
+dictionary AuthenticatorSelectionCriteria {
+ DOMString authenticatorAttachment;
+ DOMString residentKey;
+ boolean requireResidentKey = false;
+ DOMString userVerification = "preferred";
+};
+
+enum AuthenticatorAttachment {
+ "platform",
+ "cross-platform"
+};
+
+enum ResidentKeyRequirement {
+ "discouraged",
+ "preferred",
+ "required"
+};
+
+enum AttestationConveyancePreference {
+ "none",
+ "indirect",
+ "direct",
+ "enterprise"
+};
+
+dictionary PublicKeyCredentialRequestOptions {
+ required BufferSource challenge;
+ unsigned long timeout;
+ USVString rpId;
+ sequence<PublicKeyCredentialDescriptor> allowCredentials = [];
+ DOMString userVerification = "preferred";
+ DOMString attestation = "none";
+ sequence<DOMString> attestationFormats = [];
+ AuthenticationExtensionsClientInputs extensions;
+};
+
+dictionary AuthenticationExtensionsClientInputs {
+};
+
+dictionary AuthenticationExtensionsClientOutputs {
+};
+
+dictionary CollectedClientData {
+ required DOMString type;
+ required DOMString challenge;
+ required DOMString origin;
+ DOMString topOrigin;
+ boolean crossOrigin;
+};
+
+dictionary TokenBinding {
+ required DOMString status;
+ DOMString id;
+};
+
+enum TokenBindingStatus { "present", "supported" };
+
+enum PublicKeyCredentialType {
+ "public-key"
+};
+
+dictionary PublicKeyCredentialDescriptor {
+ required DOMString type;
+ required BufferSource id;
+ sequence<DOMString> transports;
+};
+
+enum AuthenticatorTransport {
+ "usb",
+ "nfc",
+ "ble",
+ "smart-card",
+ "hybrid",
+ "internal"
+};
+
+typedef long COSEAlgorithmIdentifier;
+
+enum UserVerificationRequirement {
+ "required",
+ "preferred",
+ "discouraged"
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ USVString appid;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ boolean appid;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ USVString appidExclude;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ boolean appidExclude;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ boolean credProps;
+};
+
+dictionary CredentialPropertiesOutput {
+ boolean rk;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ CredentialPropertiesOutput credProps;
+};
+
+dictionary AuthenticationExtensionsPRFValues {
+ required BufferSource first;
+ BufferSource second;
+};
+
+dictionary AuthenticationExtensionsPRFInputs {
+ AuthenticationExtensionsPRFValues eval;
+ record<USVString, AuthenticationExtensionsPRFValues> evalByCredential;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ AuthenticationExtensionsPRFInputs prf;
+};
+
+dictionary AuthenticationExtensionsPRFOutputs {
+ boolean enabled;
+ AuthenticationExtensionsPRFValues results;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ AuthenticationExtensionsPRFOutputs prf;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ AuthenticationExtensionsLargeBlobInputs largeBlob;
+};
+
+enum LargeBlobSupport {
+ "required",
+ "preferred",
+};
+
+dictionary AuthenticationExtensionsLargeBlobInputs {
+ DOMString support;
+ boolean read;
+ BufferSource write;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ AuthenticationExtensionsLargeBlobOutputs largeBlob;
+};
+
+dictionary AuthenticationExtensionsLargeBlobOutputs {
+ boolean supported;
+ ArrayBuffer blob;
+ boolean written;
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ boolean uvm;
+};
+
+typedef sequence<unsigned long> UvmEntry;
+typedef sequence<UvmEntry> UvmEntries;
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ UvmEntries uvm;
+};
+
+dictionary AuthenticationExtensionsDevicePublicKeyInputs {
+ DOMString attestation = "none";
+ sequence<DOMString> attestationFormats = [];
+};
+
+partial dictionary AuthenticationExtensionsClientInputs {
+ AuthenticationExtensionsDevicePublicKeyInputs devicePubKey;
+};
+
+dictionary AuthenticationExtensionsDevicePublicKeyOutputs {
+ ArrayBuffer signature;
+};
+
+partial dictionary AuthenticationExtensionsClientOutputs {
+ AuthenticationExtensionsDevicePublicKeyOutputs devicePubKey;
+};