From e7a433f41e7e14c5b6a0237472c8e46130f44efb Mon Sep 17 00:00:00 2001 From: Juliet Levesque Date: Thu, 15 Feb 2024 14:33:02 -0800 Subject: [PATCH] [Nearby Presence] Add authentication status to `ConnectionResponseInfo` Adds authentication status to `ConnectionResponseInfo`, which will pass the result of the authentication to clients when the connection is complete. See go/cros-nearby-presence-np-nc-authentication for details. This will be used in follow up CL to communicate the authentication status to clients of RequestConnectionV3(). PiperOrigin-RevId: 607457933 --- connections/BUILD | 1 + connections/listeners.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/connections/BUILD b/connections/BUILD index 2ab67e4c..489acf3a 100644 --- a/connections/BUILD +++ b/connections/BUILD @@ -77,6 +77,7 @@ cc_library( "//sharing:__subpackages__", ], deps = [ + "//internal/interop:authentication_status", "//internal/platform:base", "//internal/platform:types", "//internal/platform:util", diff --git a/connections/listeners.h b/connections/listeners.h index 493decaf..ad909594 100644 --- a/connections/listeners.h +++ b/connections/listeners.h @@ -31,6 +31,7 @@ #include "connections/connection_options.h" #include "connections/payload.h" #include "connections/status.h" +#include "internal/interop/authentication_status.h" #include "internal/platform/byte_array.h" #include "internal/platform/byte_utils.h" @@ -56,6 +57,10 @@ struct ConnectionResponseInfo { ByteArray raw_authentication_token; bool is_incoming_connection = false; bool is_connection_verified = false; + + // Result of authentication via the DeviceProvider, if available. Only used + // for `RequestConnectionV3()`. + AuthenticationStatus authentication_status = AuthenticationStatus::kUnknown; }; struct PayloadProgressInfo {