#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-params-data.h"
#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
IdentityProviderConfig::IdentityProviderConfig()
: … { … }
IdentityProviderConfig::IdentityProviderConfig(
const ::blink::KURL& config_url_in,
bool use_registered_config_urls_in,
const WTF::String& type_in,
const WTF::String& client_id_in)
: … { … }
IdentityProviderConfig::~IdentityProviderConfig() = default;
void IdentityProviderConfig::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool IdentityProviderConfig::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
IdentityProviderRequestOptions::IdentityProviderRequestOptions()
: … { … }
IdentityProviderRequestOptions::IdentityProviderRequestOptions(
IdentityProviderConfigPtr config_in,
const WTF::String& nonce_in,
const WTF::String& login_hint_in,
const WTF::String& domain_hint_in,
std::optional<WTF::Vector<WTF::String>> fields_in,
const WTF::HashMap<WTF::String, WTF::String>& params_in)
: … { … }
IdentityProviderRequestOptions::~IdentityProviderRequestOptions() = default;
void IdentityProviderRequestOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool IdentityProviderRequestOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
IdentityCredentialDisconnectOptions::IdentityCredentialDisconnectOptions()
: … { … }
IdentityCredentialDisconnectOptions::IdentityCredentialDisconnectOptions(
IdentityProviderConfigPtr config_in,
const WTF::String& account_hint_in)
: … { … }
IdentityCredentialDisconnectOptions::~IdentityCredentialDisconnectOptions() = default;
void IdentityCredentialDisconnectOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool IdentityCredentialDisconnectOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
IdentityUserInfo::IdentityUserInfo()
: … { … }
IdentityUserInfo::IdentityUserInfo(
const WTF::String& email_in,
const WTF::String& given_name_in,
const WTF::String& name_in,
const WTF::String& picture_in)
: … { … }
IdentityUserInfo::~IdentityUserInfo() = default;
size_t IdentityUserInfo::Hash(size_t seed) const { … }
void IdentityUserInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool IdentityUserInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
IdentityProviderGetParameters::IdentityProviderGetParameters()
: … { … }
IdentityProviderGetParameters::IdentityProviderGetParameters(
WTF::Vector<IdentityProviderRequestOptionsPtr> providers_in,
RpContext context_in,
RpMode mode_in)
: … { … }
IdentityProviderGetParameters::~IdentityProviderGetParameters() = default;
void IdentityProviderGetParameters::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool IdentityProviderGetParameters::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
TokenError::TokenError()
: … { … }
TokenError::TokenError(
const WTF::String& code_in,
const WTF::String& url_in)
: … { … }
TokenError::~TokenError() = default;
void TokenError::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool TokenError::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FederatedAuthRequest::Name_[] = …;
FederatedAuthRequest::IPCStableHashFunction FederatedAuthRequest::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FederatedAuthRequest::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FederatedAuthRequest::RequestToken_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::RequestUserInfo_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::CancelTokenRequest_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::ResolveTokenRequest_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::SetIdpSigninStatus_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::RegisterIdP_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::UnregisterIdP_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::CloseModalDialogView_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::PreventSilentAccess_Sym::IPCStableHash() { … }
uint32_t FederatedAuthRequest::Disconnect_Sym::IPCStableHash() { … }
# endif
class FederatedAuthRequest_RequestToken_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_RequestUserInfo_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_ResolveTokenRequest_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_RegisterIdP_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_UnregisterIdP_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_PreventSilentAccess_ForwardToCallback
: public mojo::MessageReceiver { … };
class FederatedAuthRequest_Disconnect_ForwardToCallback
: public mojo::MessageReceiver { … };
FederatedAuthRequestProxy::FederatedAuthRequestProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FederatedAuthRequestProxy::RequestToken(
WTF::Vector<IdentityProviderGetParametersPtr> in_idp_get_params, ::blink::mojom::blink::CredentialMediationRequirement in_requirement, RequestTokenCallback callback) { … }
void FederatedAuthRequestProxy::RequestUserInfo(
IdentityProviderConfigPtr in_provider, RequestUserInfoCallback callback) { … }
void FederatedAuthRequestProxy::CancelTokenRequest(
) { … }
void FederatedAuthRequestProxy::ResolveTokenRequest(
const WTF::String& in_account_id, const WTF::String& in_token, ResolveTokenRequestCallback callback) { … }
void FederatedAuthRequestProxy::SetIdpSigninStatus(
const ::scoped_refptr<const ::blink::SecurityOrigin>& in_origin, IdpSigninStatus in_status) { … }
void FederatedAuthRequestProxy::RegisterIdP(
const ::blink::KURL& in_url, RegisterIdPCallback callback) { … }
void FederatedAuthRequestProxy::UnregisterIdP(
const ::blink::KURL& in_url, UnregisterIdPCallback callback) { … }
void FederatedAuthRequestProxy::CloseModalDialogView(
) { … }
void FederatedAuthRequestProxy::PreventSilentAccess(
PreventSilentAccessCallback callback) { … }
void FederatedAuthRequestProxy::Disconnect(
IdentityCredentialDisconnectOptionsPtr in_options, DisconnectCallback callback) { … }
class FederatedAuthRequest_RequestToken_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_RequestToken_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_RequestToken_ProxyToResponder::Run(
RequestTokenStatus in_status, const std::optional<::blink::KURL>& in_selected_identity_provider_config_url, const WTF::String& in_token, TokenErrorPtr in_error, bool in_is_auto_selected) { … }
class FederatedAuthRequest_RequestUserInfo_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_RequestUserInfo_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_RequestUserInfo_ProxyToResponder::Run(
RequestUserInfoStatus in_status, std::optional<WTF::Vector<IdentityUserInfoPtr>> in_user_info) { … }
class FederatedAuthRequest_ResolveTokenRequest_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_ResolveTokenRequest_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_ResolveTokenRequest_ProxyToResponder::Run(
bool in_success) { … }
class FederatedAuthRequest_RegisterIdP_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_RegisterIdP_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_RegisterIdP_ProxyToResponder::Run(
RegisterIdpStatus in_status) { … }
class FederatedAuthRequest_UnregisterIdP_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_UnregisterIdP_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_UnregisterIdP_ProxyToResponder::Run(
bool in_success) { … }
class FederatedAuthRequest_PreventSilentAccess_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_PreventSilentAccess_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_PreventSilentAccess_ProxyToResponder::Run(
) { … }
class FederatedAuthRequest_Disconnect_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FederatedAuthRequest_Disconnect_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FederatedAuthRequest_Disconnect_ProxyToResponder::Run(
DisconnectStatus in_status) { … }
bool FederatedAuthRequestStubDispatch::Accept(
FederatedAuthRequest* impl,
mojo::Message* message) { … }
bool FederatedAuthRequestStubDispatch::AcceptWithResponder(
FederatedAuthRequest* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFederatedAuthRequestValidationInfo[] = …;
bool FederatedAuthRequestRequestValidator::Accept(mojo::Message* message) { … }
bool FederatedAuthRequestResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::IdentityProviderConfig::DataView, ::blink::mojom::blink::IdentityProviderConfigPtr>::Read(
::blink::mojom::blink::IdentityProviderConfig::DataView input,
::blink::mojom::blink::IdentityProviderConfigPtr* output) { … }
bool StructTraits<::blink::mojom::blink::IdentityProviderRequestOptions::DataView, ::blink::mojom::blink::IdentityProviderRequestOptionsPtr>::Read(
::blink::mojom::blink::IdentityProviderRequestOptions::DataView input,
::blink::mojom::blink::IdentityProviderRequestOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::IdentityCredentialDisconnectOptions::DataView, ::blink::mojom::blink::IdentityCredentialDisconnectOptionsPtr>::Read(
::blink::mojom::blink::IdentityCredentialDisconnectOptions::DataView input,
::blink::mojom::blink::IdentityCredentialDisconnectOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::IdentityUserInfo::DataView, ::blink::mojom::blink::IdentityUserInfoPtr>::Read(
::blink::mojom::blink::IdentityUserInfo::DataView input,
::blink::mojom::blink::IdentityUserInfoPtr* output) { … }
bool StructTraits<::blink::mojom::blink::IdentityProviderGetParameters::DataView, ::blink::mojom::blink::IdentityProviderGetParametersPtr>::Read(
::blink::mojom::blink::IdentityProviderGetParameters::DataView input,
::blink::mojom::blink::IdentityProviderGetParametersPtr* output) { … }
bool StructTraits<::blink::mojom::blink::TokenError::DataView, ::blink::mojom::blink::TokenErrorPtr>::Read(
::blink::mojom::blink::TokenError::DataView input,
::blink::mojom::blink::TokenErrorPtr* output) { … }
}
namespace blink::mojom::blink {
void FederatedAuthRequestInterceptorForTesting::RequestToken(WTF::Vector<IdentityProviderGetParametersPtr> idp_get_params, ::blink::mojom::blink::CredentialMediationRequirement requirement, RequestTokenCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::RequestUserInfo(IdentityProviderConfigPtr provider, RequestUserInfoCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::CancelTokenRequest() { … }
void FederatedAuthRequestInterceptorForTesting::ResolveTokenRequest(const WTF::String& account_id, const WTF::String& token, ResolveTokenRequestCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::SetIdpSigninStatus(const ::scoped_refptr<const ::blink::SecurityOrigin>& origin, IdpSigninStatus status) { … }
void FederatedAuthRequestInterceptorForTesting::RegisterIdP(const ::blink::KURL& url, RegisterIdPCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::UnregisterIdP(const ::blink::KURL& url, UnregisterIdPCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::CloseModalDialogView() { … }
void FederatedAuthRequestInterceptorForTesting::PreventSilentAccess(PreventSilentAccessCallback callback) { … }
void FederatedAuthRequestInterceptorForTesting::Disconnect(IdentityCredentialDisconnectOptionsPtr options, DisconnectCallback callback) { … }
FederatedAuthRequestAsyncWaiter::FederatedAuthRequestAsyncWaiter(
FederatedAuthRequest* proxy) : … { … }
FederatedAuthRequestAsyncWaiter::~FederatedAuthRequestAsyncWaiter() = default;
void FederatedAuthRequestAsyncWaiter::RequestToken(
WTF::Vector<IdentityProviderGetParametersPtr> idp_get_params, ::blink::mojom::blink::CredentialMediationRequirement requirement, RequestTokenStatus* out_status, std::optional<::blink::KURL>* out_selected_identity_provider_config_url, WTF::String* out_token, TokenErrorPtr* out_error, bool* out_is_auto_selected) { … }
void FederatedAuthRequestAsyncWaiter::RequestUserInfo(
IdentityProviderConfigPtr provider, RequestUserInfoStatus* out_status, std::optional<WTF::Vector<IdentityUserInfoPtr>>* out_user_info) { … }
void FederatedAuthRequestAsyncWaiter::ResolveTokenRequest(
const WTF::String& account_id, const WTF::String& token, bool* out_success) { … }
bool FederatedAuthRequestAsyncWaiter::ResolveTokenRequest(
const WTF::String& account_id, const WTF::String& token) { … }
void FederatedAuthRequestAsyncWaiter::RegisterIdP(
const ::blink::KURL& url, RegisterIdpStatus* out_status) { … }
RegisterIdpStatus FederatedAuthRequestAsyncWaiter::RegisterIdP(
const ::blink::KURL& url) { … }
void FederatedAuthRequestAsyncWaiter::UnregisterIdP(
const ::blink::KURL& url, bool* out_success) { … }
bool FederatedAuthRequestAsyncWaiter::UnregisterIdP(
const ::blink::KURL& url) { … }
void FederatedAuthRequestAsyncWaiter::PreventSilentAccess(
) { … }
void FederatedAuthRequestAsyncWaiter::Disconnect(
IdentityCredentialDisconnectOptionsPtr options, DisconnectStatus* out_status) { … }
DisconnectStatus FederatedAuthRequestAsyncWaiter::Disconnect(
IdentityCredentialDisconnectOptionsPtr options) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif