From d82d5bf419f7ec47a21bffd2fe2bacc4db6780d2 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 9 Jul 2024 14:06:55 -0700 Subject: [PATCH 1/2] Expand documentation for AppCheck --- app_check/src/FirebaseAppCheck.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app_check/src/FirebaseAppCheck.cs b/app_check/src/FirebaseAppCheck.cs index 7cfc4457e..a57664924 100644 --- a/app_check/src/FirebaseAppCheck.cs +++ b/app_check/src/FirebaseAppCheck.cs @@ -20,6 +20,14 @@ namespace Firebase.AppCheck { /// @brief Firebase App Check object. +/// +/// App Check helps protect your API resources from abuse by preventing +/// unauthorized clients from accessing your backend resources. +/// +/// With App Check, devices running your app will use an AppCheckProvider that +/// attests to one or both of the following: +/// * Requests originate from your authentic app +/// * Requests originate from an authentic, untampered device public sealed class FirebaseAppCheck { // The C++ object that this wraps. private AppCheckInternal appCheckInternal; From f20ee5176a3fda3d8adc13574fd8021998f26b35 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 9 Jul 2024 18:14:08 -0700 Subject: [PATCH 2/2] Update FirebaseAppCheck.cs --- app_check/src/FirebaseAppCheck.cs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/app_check/src/FirebaseAppCheck.cs b/app_check/src/FirebaseAppCheck.cs index a57664924..be5bd6702 100644 --- a/app_check/src/FirebaseAppCheck.cs +++ b/app_check/src/FirebaseAppCheck.cs @@ -61,7 +61,7 @@ private void ThrowIfNull() { } /// Gets the instance of FirebaseAppCheck associated with the default - /// {@link FirebaseApp} instance. + /// FirebaseApp instance. public static FirebaseAppCheck DefaultInstance { get { return GetInstance(FirebaseApp.DefaultInstance); @@ -69,7 +69,7 @@ public static FirebaseAppCheck DefaultInstance { } /// Gets the instance of FirebaseAppCheck associated with the given - /// {@link FirebaseApp} instance. + /// FirebaseApp instance. public static FirebaseAppCheck GetInstance(FirebaseApp app) { FirebaseAppCheck result; if (!appCheckMap.TryGetValue(app.Name, out result)) { @@ -80,18 +80,14 @@ public static FirebaseAppCheck GetInstance(FirebaseApp app) { return result; } - /// Installs the given {@link AppCheckProviderFactory}, overwriting any that - /// were previously associated with this {@code FirebaseAppCheck} instance. - /// Any {@link AppCheckTokenListener}s attached to this - /// {@code FirebaseAppCheck} instance will be transferred from existing - /// factories to the newly installed one. + /// Installs the given IAppCheckProviderFactory, overwriting any that + /// were previously associated with this FirebaseAppCheck instance. /// - ///

Automatic token refreshing will only occur if the global {@code - /// isDataCollectionDefaultEnabled} flag is set to true. To allow automatic - /// token refreshing for Firebase App Check without changing the {@code - /// isDataCollectionDefaultEnabled} flag for other Firebase SDKs, call - /// {@link #setTokenAutoRefreshEnabled(bool)} after installing the {@code - /// factory}. + /// Automatic token refreshing will only occur if the global + /// isDataCollectionDefaultEnabled flag is set to true. To allow automatic + /// token refreshing for Firebase App Check without changing the + /// isDataCollectionDefaultEnabled flag for other Firebase SDKs, call + /// SetTokenAutoRefreshEnabled(bool) after installing the factory. /// /// This method should be called before initializing the Firebase App. public static void SetAppCheckProviderFactory(IAppCheckProviderFactory factory) {