Package org.mozilla.geckoview
Interface IPProtectionController.AuthProvider
- Enclosing class:
- IPProtectionController
public static interface IPProtectionController.AuthProvider
Embedder-provided hooks for authentication.
-
Method Summary
Modifier and TypeMethodDescriptiondefault GeckoResult<String>Invoked by Gecko to obtain a fresh authentication token from the embedder.
-
Method Details
-
onTokenRequest
Invoked by Gecko to obtain a fresh authentication token from the embedder. Called for every Guardian API request; the implementer is responsible for caching and refreshing.The token must have the "https://identity.mozilla.com/apps/vpn" scope.
To signal that no token is available, return a
GeckoResultthat rejects (e.g.GeckoResult.fromException(Throwable)) or resolves tonullor an empty string. In all of those cases the in-flight Guardian request will fail with"no-token".- Returns:
- A
GeckoResultthat resolves to a non-empty token string.
-