Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM WebAuthentication.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_WEBAUTHENTICATIONBINDING_H_
#define DOM_WEBAUTHENTICATIONBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/dom/UnionTypes.h"
namespace mozilla {
namespace dom {
class ArrayBufferViewOrArrayBuffer;
struct AuthenticationExtensionsClientInputs;
struct AuthenticationExtensionsClientInputsAtoms;
struct AuthenticationExtensionsClientInputsJSON;
struct AuthenticationExtensionsClientInputsJSONAtoms;
struct AuthenticationExtensionsClientOutputsAtoms;
struct AuthenticationExtensionsClientOutputsJSON;
struct AuthenticationExtensionsClientOutputsJSONAtoms;
struct AuthenticationResponseJSONAtoms;
class AuthenticatorAssertionResponse;
struct AuthenticatorAssertionResponseJSON;
struct AuthenticatorAssertionResponseJSONAtoms;
class AuthenticatorAttestationResponse;
struct AuthenticatorAttestationResponseJSON;
struct AuthenticatorAttestationResponseJSONAtoms;
class AuthenticatorResponse;
struct AuthenticatorSelectionCriteria;
struct AuthenticatorSelectionCriteriaAtoms;
struct CredentialPropertiesOutput;
struct CredentialPropertiesOutputAtoms;
struct NativePropertyHooks;
class OwningArrayBufferViewOrArrayBuffer;
class ProtoAndIfaceCache;
class PublicKeyCredential;
struct PublicKeyCredentialCreationOptionsAtoms;
struct PublicKeyCredentialCreationOptionsJSONAtoms;
struct PublicKeyCredentialDescriptor;
struct PublicKeyCredentialDescriptorAtoms;
struct PublicKeyCredentialDescriptorJSON;
struct PublicKeyCredentialDescriptorJSONAtoms;
struct PublicKeyCredentialEntityAtoms;
struct PublicKeyCredentialParameters;
struct PublicKeyCredentialParametersAtoms;
struct PublicKeyCredentialRequestOptionsAtoms;
struct PublicKeyCredentialRequestOptionsJSONAtoms;
struct PublicKeyCredentialRpEntity;
struct PublicKeyCredentialRpEntityAtoms;
struct PublicKeyCredentialUserEntity;
struct PublicKeyCredentialUserEntityAtoms;
struct PublicKeyCredentialUserEntityJSON;
struct PublicKeyCredentialUserEntityJSONAtoms;
struct RegistrationResponseJSONAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct AuthenticationExtensionsClientInputs : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAppid;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mCredProps;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mHmacCreateSecret;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mMinPinLength;
AuthenticationExtensionsClientInputs();
explicit inline AuthenticationExtensionsClientInputs(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticationExtensionsClientInputs(AuthenticationExtensionsClientInputs&& aOther) = default;
explicit inline AuthenticationExtensionsClientInputs(const AuthenticationExtensionsClientInputs& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticationExtensionsClientInputs&
operator=(const AuthenticationExtensionsClientInputs& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticationExtensionsClientInputsAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticationExtensionsClientInputs : public AuthenticationExtensionsClientInputs
{
inline FastAuthenticationExtensionsClientInputs()
: AuthenticationExtensionsClientInputs(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticationExtensionsClientInputsJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAppid;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mCredProps;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mHmacCreateSecret;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mMinPinLength;
AuthenticationExtensionsClientInputsJSON();
explicit inline AuthenticationExtensionsClientInputsJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticationExtensionsClientInputsJSON(AuthenticationExtensionsClientInputsJSON&& aOther) = default;
explicit inline AuthenticationExtensionsClientInputsJSON(const AuthenticationExtensionsClientInputsJSON& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
AuthenticationExtensionsClientInputsJSON&
operator=(const AuthenticationExtensionsClientInputsJSON& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticationExtensionsClientInputsJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticationExtensionsClientInputsJSON : public AuthenticationExtensionsClientInputsJSON
{
inline FastAuthenticationExtensionsClientInputsJSON()
: AuthenticationExtensionsClientInputsJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticatorAssertionResponseJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAttestationObject;
MOZ_INIT_OUTSIDE_CTOR nsString mAuthenticatorData;
MOZ_INIT_OUTSIDE_CTOR nsString mClientDataJSON;
MOZ_INIT_OUTSIDE_CTOR nsString mSignature;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mUserHandle;
AuthenticatorAssertionResponseJSON();
explicit inline AuthenticatorAssertionResponseJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticatorAssertionResponseJSON(AuthenticatorAssertionResponseJSON&& aOther) = default;
explicit inline AuthenticatorAssertionResponseJSON(const AuthenticatorAssertionResponseJSON& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticatorAssertionResponseJSON&
operator=(const AuthenticatorAssertionResponseJSON& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticatorAssertionResponseJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticatorAssertionResponseJSON : public AuthenticatorAssertionResponseJSON
{
inline FastAuthenticatorAssertionResponseJSON()
: AuthenticatorAssertionResponseJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticatorAttestationResponseJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mAttestationObject;
MOZ_INIT_OUTSIDE_CTOR nsString mAuthenticatorData;
MOZ_INIT_OUTSIDE_CTOR nsString mClientDataJSON;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mPublicKey;
MOZ_INIT_OUTSIDE_CTOR int64_t mPublicKeyAlgorithm;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mTransports;
AuthenticatorAttestationResponseJSON();
explicit inline AuthenticatorAttestationResponseJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticatorAttestationResponseJSON(AuthenticatorAttestationResponseJSON&& aOther) = default;
explicit inline AuthenticatorAttestationResponseJSON(const AuthenticatorAttestationResponseJSON& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticatorAttestationResponseJSON&
operator=(const AuthenticatorAttestationResponseJSON& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticatorAttestationResponseJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticatorAttestationResponseJSON : public AuthenticatorAttestationResponseJSON
{
inline FastAuthenticatorAttestationResponseJSON()
: AuthenticatorAttestationResponseJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticatorSelectionCriteria : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAuthenticatorAttachment;
MOZ_INIT_OUTSIDE_CTOR bool mRequireResidentKey;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mResidentKey;
MOZ_INIT_OUTSIDE_CTOR nsString mUserVerification;
AuthenticatorSelectionCriteria();
explicit inline AuthenticatorSelectionCriteria(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticatorSelectionCriteria(AuthenticatorSelectionCriteria&& aOther) = default;
explicit inline AuthenticatorSelectionCriteria(const AuthenticatorSelectionCriteria& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticatorSelectionCriteria&
operator=(const AuthenticatorSelectionCriteria& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticatorSelectionCriteriaAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticatorSelectionCriteria : public AuthenticatorSelectionCriteria
{
inline FastAuthenticatorSelectionCriteria()
: AuthenticatorSelectionCriteria(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct CredentialPropertiesOutput : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mRk;
CredentialPropertiesOutput();
explicit inline CredentialPropertiesOutput(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
CredentialPropertiesOutput(CredentialPropertiesOutput&& aOther) = default;
explicit inline CredentialPropertiesOutput(const CredentialPropertiesOutput& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
CredentialPropertiesOutput&
operator=(const CredentialPropertiesOutput& aOther);
private:
static bool
InitIds(JSContext* cx, CredentialPropertiesOutputAtoms* atomsCache);
};
namespace binding_detail {
struct FastCredentialPropertiesOutput : public CredentialPropertiesOutput
{
inline FastCredentialPropertiesOutput()
: CredentialPropertiesOutput(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialDescriptor : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mId;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mTransports;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
PublicKeyCredentialDescriptor();
explicit inline PublicKeyCredentialDescriptor(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialDescriptor(PublicKeyCredentialDescriptor&& aOther) = default;
private:
PublicKeyCredentialDescriptor(const PublicKeyCredentialDescriptor&) = delete;
PublicKeyCredentialDescriptor& operator=(const PublicKeyCredentialDescriptor&) = delete;
static bool
InitIds(JSContext* cx, PublicKeyCredentialDescriptorAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastPublicKeyCredentialDescriptor : public PublicKeyCredentialDescriptor
{
inline FastPublicKeyCredentialDescriptor()
: PublicKeyCredentialDescriptor(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialDescriptorJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mId;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mTransports;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
PublicKeyCredentialDescriptorJSON();
explicit inline PublicKeyCredentialDescriptorJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialDescriptorJSON(PublicKeyCredentialDescriptorJSON&& aOther) = default;
explicit inline PublicKeyCredentialDescriptorJSON(const PublicKeyCredentialDescriptorJSON& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialDescriptorJSON&
operator=(const PublicKeyCredentialDescriptorJSON& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialDescriptorJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialDescriptorJSON : public PublicKeyCredentialDescriptorJSON
{
inline FastPublicKeyCredentialDescriptorJSON()
: PublicKeyCredentialDescriptorJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialEntity : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mName;
PublicKeyCredentialEntity();
explicit inline PublicKeyCredentialEntity(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialEntity(PublicKeyCredentialEntity&& aOther) = default;
explicit inline PublicKeyCredentialEntity(const PublicKeyCredentialEntity& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialEntity&
operator=(const PublicKeyCredentialEntity& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialEntityAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialEntity : public PublicKeyCredentialEntity
{
inline FastPublicKeyCredentialEntity()
: PublicKeyCredentialEntity(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialParameters : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR int32_t mAlg;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
PublicKeyCredentialParameters();
explicit inline PublicKeyCredentialParameters(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialParameters(PublicKeyCredentialParameters&& aOther) = default;
explicit inline PublicKeyCredentialParameters(const PublicKeyCredentialParameters& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialParameters&
operator=(const PublicKeyCredentialParameters& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialParametersAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialParameters : public PublicKeyCredentialParameters
{
inline FastPublicKeyCredentialParameters()
: PublicKeyCredentialParameters(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialUserEntityJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mDisplayName;
MOZ_INIT_OUTSIDE_CTOR nsString mId;
MOZ_INIT_OUTSIDE_CTOR nsString mName;
PublicKeyCredentialUserEntityJSON();
explicit inline PublicKeyCredentialUserEntityJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialUserEntityJSON(PublicKeyCredentialUserEntityJSON&& aOther) = default;
explicit inline PublicKeyCredentialUserEntityJSON(const PublicKeyCredentialUserEntityJSON& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialUserEntityJSON&
operator=(const PublicKeyCredentialUserEntityJSON& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialUserEntityJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialUserEntityJSON : public PublicKeyCredentialUserEntityJSON
{
inline FastPublicKeyCredentialUserEntityJSON()
: PublicKeyCredentialUserEntityJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticationExtensionsClientOutputs : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mAppid;
MOZ_INIT_OUTSIDE_CTOR Optional<CredentialPropertiesOutput> mCredProps;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mHmacCreateSecret;
AuthenticationExtensionsClientOutputs();
explicit inline AuthenticationExtensionsClientOutputs(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticationExtensionsClientOutputs(AuthenticationExtensionsClientOutputs&& aOther) = default;
explicit inline AuthenticationExtensionsClientOutputs(const AuthenticationExtensionsClientOutputs& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticationExtensionsClientOutputs&
operator=(const AuthenticationExtensionsClientOutputs& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticationExtensionsClientOutputsAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticationExtensionsClientOutputs : public AuthenticationExtensionsClientOutputs
{
inline FastAuthenticationExtensionsClientOutputs()
: AuthenticationExtensionsClientOutputs(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticationExtensionsClientOutputsJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mAppid;
MOZ_INIT_OUTSIDE_CTOR Optional<CredentialPropertiesOutput> mCredProps;
MOZ_INIT_OUTSIDE_CTOR Optional<bool> mHmacCreateSecret;
AuthenticationExtensionsClientOutputsJSON();
explicit inline AuthenticationExtensionsClientOutputsJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticationExtensionsClientOutputsJSON(AuthenticationExtensionsClientOutputsJSON&& aOther) = default;
explicit inline AuthenticationExtensionsClientOutputsJSON(const AuthenticationExtensionsClientOutputsJSON& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticationExtensionsClientOutputsJSON&
operator=(const AuthenticationExtensionsClientOutputsJSON& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticationExtensionsClientOutputsJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticationExtensionsClientOutputsJSON : public AuthenticationExtensionsClientOutputsJSON
{
inline FastAuthenticationExtensionsClientOutputsJSON()
: AuthenticationExtensionsClientOutputsJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialRequestOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialDescriptor> mAllowCredentials;
MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mChallenge;
MOZ_INIT_OUTSIDE_CTOR AuthenticationExtensionsClientInputs mExtensions;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mRpId;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mTimeout;
MOZ_INIT_OUTSIDE_CTOR nsString mUserVerification;
PublicKeyCredentialRequestOptions();
explicit inline PublicKeyCredentialRequestOptions(const FastDictionaryInitializer& )
: mExtensions(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialRequestOptions(PublicKeyCredentialRequestOptions&& aOther) = default;
private:
PublicKeyCredentialRequestOptions(const PublicKeyCredentialRequestOptions&) = delete;
PublicKeyCredentialRequestOptions& operator=(const PublicKeyCredentialRequestOptions&) = delete;
static bool
InitIds(JSContext* cx, PublicKeyCredentialRequestOptionsAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastPublicKeyCredentialRequestOptions : public PublicKeyCredentialRequestOptions
{
inline FastPublicKeyCredentialRequestOptions()
: PublicKeyCredentialRequestOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialRequestOptionsJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialDescriptorJSON> mAllowCredentials;
MOZ_INIT_OUTSIDE_CTOR nsString mAttestation;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mAttestationFormats;
MOZ_INIT_OUTSIDE_CTOR nsString mChallenge;
MOZ_INIT_OUTSIDE_CTOR Optional<AuthenticationExtensionsClientInputsJSON> mExtensions;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mHints;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mRpId;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mTimeout;
MOZ_INIT_OUTSIDE_CTOR nsString mUserVerification;
PublicKeyCredentialRequestOptionsJSON();
explicit inline PublicKeyCredentialRequestOptionsJSON(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialRequestOptionsJSON(PublicKeyCredentialRequestOptionsJSON&& aOther) = default;
explicit inline PublicKeyCredentialRequestOptionsJSON(const PublicKeyCredentialRequestOptionsJSON& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialRequestOptionsJSON&
operator=(const PublicKeyCredentialRequestOptionsJSON& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialRequestOptionsJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialRequestOptionsJSON : public PublicKeyCredentialRequestOptionsJSON
{
inline FastPublicKeyCredentialRequestOptionsJSON()
: PublicKeyCredentialRequestOptionsJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialRpEntity : public PublicKeyCredentialEntity
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mId;
PublicKeyCredentialRpEntity();
explicit inline PublicKeyCredentialRpEntity(const FastDictionaryInitializer& )
: PublicKeyCredentialEntity(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialRpEntity(PublicKeyCredentialRpEntity&& aOther) = default;
explicit inline PublicKeyCredentialRpEntity(const PublicKeyCredentialRpEntity& aOther)
: PublicKeyCredentialEntity(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialRpEntity&
operator=(const PublicKeyCredentialRpEntity& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialRpEntityAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialRpEntity : public PublicKeyCredentialRpEntity
{
inline FastPublicKeyCredentialRpEntity()
: PublicKeyCredentialRpEntity(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialUserEntity : public PublicKeyCredentialEntity
{
MOZ_INIT_OUTSIDE_CTOR nsString mDisplayName;
MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mId;
PublicKeyCredentialUserEntity();
explicit inline PublicKeyCredentialUserEntity(const FastDictionaryInitializer& )
: PublicKeyCredentialEntity(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialUserEntity(PublicKeyCredentialUserEntity&& aOther) = default;
private:
PublicKeyCredentialUserEntity(const PublicKeyCredentialUserEntity&) = delete;
PublicKeyCredentialUserEntity& operator=(const PublicKeyCredentialUserEntity&) = delete;
static bool
InitIds(JSContext* cx, PublicKeyCredentialUserEntityAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastPublicKeyCredentialUserEntity : public PublicKeyCredentialUserEntity
{
inline FastPublicKeyCredentialUserEntity()
: PublicKeyCredentialUserEntity(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AuthenticationResponseJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAuthenticatorAttachment;
MOZ_INIT_OUTSIDE_CTOR AuthenticationExtensionsClientOutputsJSON mClientExtensionResults;
MOZ_INIT_OUTSIDE_CTOR nsString mId;
MOZ_INIT_OUTSIDE_CTOR nsString mRawId;
MOZ_INIT_OUTSIDE_CTOR AuthenticatorAssertionResponseJSON mResponse;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
AuthenticationResponseJSON();
explicit inline AuthenticationResponseJSON(const FastDictionaryInitializer& )
: mClientExtensionResults(FastDictionaryInitializer()),
mResponse(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
AuthenticationResponseJSON(AuthenticationResponseJSON&& aOther) = default;
explicit inline AuthenticationResponseJSON(const AuthenticationResponseJSON& aOther)
: mClientExtensionResults(FastDictionaryInitializer()),
mResponse(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
AuthenticationResponseJSON&
operator=(const AuthenticationResponseJSON& aOther);
private:
static bool
InitIds(JSContext* cx, AuthenticationResponseJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastAuthenticationResponseJSON : public AuthenticationResponseJSON
{
inline FastAuthenticationResponseJSON()
: AuthenticationResponseJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialCreationOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mAttestation;
MOZ_INIT_OUTSIDE_CTOR AuthenticatorSelectionCriteria mAuthenticatorSelection;
MOZ_INIT_OUTSIDE_CTOR OwningArrayBufferViewOrArrayBuffer mChallenge;
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialDescriptor> mExcludeCredentials;
MOZ_INIT_OUTSIDE_CTOR AuthenticationExtensionsClientInputs mExtensions;
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialParameters> mPubKeyCredParams;
MOZ_INIT_OUTSIDE_CTOR PublicKeyCredentialRpEntity mRp;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mTimeout;
MOZ_INIT_OUTSIDE_CTOR PublicKeyCredentialUserEntity mUser;
PublicKeyCredentialCreationOptions();
explicit inline PublicKeyCredentialCreationOptions(const FastDictionaryInitializer& )
: mAuthenticatorSelection(FastDictionaryInitializer()),
mExtensions(FastDictionaryInitializer()),
mRp(FastDictionaryInitializer()),
mUser(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialCreationOptions(PublicKeyCredentialCreationOptions&& aOther) = default;
private:
PublicKeyCredentialCreationOptions(const PublicKeyCredentialCreationOptions&) = delete;
PublicKeyCredentialCreationOptions& operator=(const PublicKeyCredentialCreationOptions&) = delete;
static bool
InitIds(JSContext* cx, PublicKeyCredentialCreationOptionsAtoms* atomsCache);
public:
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
};
namespace binding_detail {
struct FastPublicKeyCredentialCreationOptions : public PublicKeyCredentialCreationOptions
{
inline FastPublicKeyCredentialCreationOptions()
: PublicKeyCredentialCreationOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct PublicKeyCredentialCreationOptionsJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR nsString mAttestation;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mAttestationFormats;
MOZ_INIT_OUTSIDE_CTOR Optional<AuthenticatorSelectionCriteria> mAuthenticatorSelection;
MOZ_INIT_OUTSIDE_CTOR nsString mChallenge;
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialDescriptorJSON> mExcludeCredentials;
MOZ_INIT_OUTSIDE_CTOR Optional<AuthenticationExtensionsClientInputsJSON> mExtensions;
MOZ_INIT_OUTSIDE_CTOR Sequence<nsString> mHints;
MOZ_INIT_OUTSIDE_CTOR Sequence<PublicKeyCredentialParameters> mPubKeyCredParams;
MOZ_INIT_OUTSIDE_CTOR PublicKeyCredentialRpEntity mRp;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mTimeout;
MOZ_INIT_OUTSIDE_CTOR PublicKeyCredentialUserEntityJSON mUser;
PublicKeyCredentialCreationOptionsJSON();
explicit inline PublicKeyCredentialCreationOptionsJSON(const FastDictionaryInitializer& )
: mRp(FastDictionaryInitializer()),
mUser(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
PublicKeyCredentialCreationOptionsJSON(PublicKeyCredentialCreationOptionsJSON&& aOther) = default;
explicit inline PublicKeyCredentialCreationOptionsJSON(const PublicKeyCredentialCreationOptionsJSON& aOther)
: mRp(FastDictionaryInitializer()),
mUser(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
PublicKeyCredentialCreationOptionsJSON&
operator=(const PublicKeyCredentialCreationOptionsJSON& aOther);
private:
static bool
InitIds(JSContext* cx, PublicKeyCredentialCreationOptionsJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastPublicKeyCredentialCreationOptionsJSON : public PublicKeyCredentialCreationOptionsJSON
{
inline FastPublicKeyCredentialCreationOptionsJSON()
: PublicKeyCredentialCreationOptionsJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct RegistrationResponseJSON : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mAuthenticatorAttachment;
MOZ_INIT_OUTSIDE_CTOR AuthenticationExtensionsClientOutputsJSON mClientExtensionResults;
MOZ_INIT_OUTSIDE_CTOR nsString mId;
MOZ_INIT_OUTSIDE_CTOR nsString mRawId;
MOZ_INIT_OUTSIDE_CTOR AuthenticatorAttestationResponseJSON mResponse;
MOZ_INIT_OUTSIDE_CTOR nsString mType;
RegistrationResponseJSON();
explicit inline RegistrationResponseJSON(const FastDictionaryInitializer& )
: mClientExtensionResults(FastDictionaryInitializer()),
mResponse(FastDictionaryInitializer())
{
// Do nothing here; this is used by our "Fast" subclass
}
RegistrationResponseJSON(RegistrationResponseJSON&& aOther) = default;
explicit inline RegistrationResponseJSON(const RegistrationResponseJSON& aOther)
: mClientExtensionResults(FastDictionaryInitializer()),
mResponse(FastDictionaryInitializer())
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
RegistrationResponseJSON&
operator=(const RegistrationResponseJSON& aOther);
private:
static bool
InitIds(JSContext* cx, RegistrationResponseJSONAtoms* atomsCache);
};
namespace binding_detail {
struct FastRegistrationResponseJSON : public RegistrationResponseJSON
{
inline FastRegistrationResponseJSON()
: RegistrationResponseJSON(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace AuthenticatorAssertionResponse_Binding {
typedef mozilla::dom::AuthenticatorAssertionResponse NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::AuthenticatorAssertionResponse* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::AuthenticatorAssertionResponse,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace AuthenticatorAssertionResponse_Binding
namespace AuthenticatorAttestationResponse_Binding {
typedef mozilla::dom::AuthenticatorAttestationResponse NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::AuthenticatorAttestationResponse* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::AuthenticatorAttestationResponse,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace AuthenticatorAttestationResponse_Binding
namespace AuthenticatorResponse_Binding {
typedef mozilla::dom::AuthenticatorResponse NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetProtoObjectHandle(JSContext* aCx);
JSObject*
GetProtoObject(JSContext* aCx);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::AuthenticatorResponse,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace AuthenticatorResponse_Binding
namespace PublicKeyCredential_Binding {
typedef mozilla::dom::PublicKeyCredential NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::dom::PublicKeyCredential* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::PublicKeyCredential,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace PublicKeyCredential_Binding
} // namespace mozilla::dom
#endif // DOM_WEBAUTHENTICATIONBINDING_H_