Skip to content

Fix App Check documentation #1064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions app_check/src/FirebaseAppCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -53,15 +61,15 @@ 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);
}
}

/// 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)) {
Expand All @@ -72,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.
///
/// <p>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) {
Expand Down
Loading