#include "third_party/blink/renderer/modules/credentialmanagement/json.h"
#include "base/containers/span.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/strcat.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_object_builder.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_arraybuffer_arraybufferview.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_inputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_inputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_outputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_outputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_large_blob_inputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_large_blob_inputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_large_blob_outputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_inputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_inputs_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_outputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_values.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_prf_values_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_supplemental_pub_keys_outputs.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_creation_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_creation_options_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_descriptor.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_descriptor_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_request_options.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_request_options_js_on.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_user_entity.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_user_entity_js_on.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_piece.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/heap_traits.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
namespace blink {
namespace {
std::optional<DOMArrayBuffer*> WebAuthnBase64UrlDecode(const String& in) { … }
PublicKeyCredentialUserEntity* PublicKeyCredentialUserEntityFromJSON(
const PublicKeyCredentialUserEntityJSON& json,
ExceptionState& exception_state) { … }
PublicKeyCredentialDescriptor* PublicKeyCredentialDescriptorFromJSON(
const std::string_view field_name,
const PublicKeyCredentialDescriptorJSON& json,
ExceptionState& exception_state) { … }
VectorOf<PublicKeyCredentialDescriptor>
PublicKeyCredentialDescriptorVectorFromJSON(
const std::string_view field_name,
const VectorOf<PublicKeyCredentialDescriptorJSON> json,
ExceptionState& exception_state) { … }
std::optional<AuthenticationExtensionsPRFValues*>
AuthenticationExtensionsPRFValuesFromJSON(
const AuthenticationExtensionsPRFValuesJSON& json) { … }
AuthenticationExtensionsClientInputs*
AuthenticationExtensionsClientInputsFromJSON(
const AuthenticationExtensionsClientInputsJSON& json,
ExceptionState& exception_state) { … }
}
WTF::String WebAuthnBase64UrlEncode(DOMArrayPiece buffer) { … }
AuthenticationExtensionsClientOutputsJSON*
AuthenticationExtensionsClientOutputsToJSON(
ScriptState* script_state,
const blink::AuthenticationExtensionsClientOutputs& in) { … }
PublicKeyCredentialCreationOptions* PublicKeyCredentialCreationOptionsFromJSON(
const PublicKeyCredentialCreationOptionsJSON* json,
ExceptionState& exception_state) { … }
PublicKeyCredentialRequestOptions* PublicKeyCredentialRequestOptionsFromJSON(
const PublicKeyCredentialRequestOptionsJSON* json,
ExceptionState& exception_state) { … }
}