Interface IPProtectionController.GpiProvider

Enclosing class:
IPProtectionController

public static interface IPProtectionController.GpiProvider
Embedder-provided hooks for Google Play Integrity authentication.
  • Method Summary

    Modifier and Type
    Method
    Description
    Invoked by Gecko to obtain a fresh GPI integrity token from the embedder.
    default GeckoResult<Void>
    Called when Gecko requests GPI warm-up.
  • Method Details

    • warmUp

      @UiThread @NonNull default GeckoResult<Void> warmUp()
      Called when Gecko requests GPI warm-up. The returned GeckoResult should resolve once warm-up is complete. On success the controller dispatches GeckoView:IPProtection:GPI:WarmUpCompleted to Gecko; on failure GeckoView:IPProtection:GPI:WarmUpFailed is dispatched so the auth provider can fall back to FxA.
      Returns:
      A GeckoResult that resolves when warm-up finishes.
    • onTokenRequest

      @UiThread @NonNull default GeckoResult<String> onTokenRequest()
      Invoked by Gecko to obtain a fresh GPI integrity token from the embedder. This is triggered during enrollment with the Guardian backend when the user turns on IP Protection, or when the cached auth token has expired and must be renewed.

      To signal that no token is available, return a GeckoResult that rejects or resolves to null or an empty string.

      Returns:
      A GeckoResult that resolves to a non-empty token string.