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>getToken()Returns a fresh authentication token.
-
Method Details
-
getToken
Returns a fresh authentication token. 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.
-