Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7733)

Unified Diff: chrome/common/extensions/api/experimental_identity.idl

Issue 14329014: Identity API: Add token cache and identity.invalidateAuthToken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rounding third rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/experimental_identity.idl
diff --git a/chrome/common/extensions/api/experimental_identity.idl b/chrome/common/extensions/api/experimental_identity.idl
index 625b0cd645cbaf60b738f585654bddb260579c52..247af454e931f31d431e3e96bdc6a7d17d8e3b29 100644
--- a/chrome/common/extensions/api/experimental_identity.idl
+++ b/chrome/common/extensions/api/experimental_identity.idl
@@ -10,6 +10,11 @@ namespace experimental.identity {
boolean? interactive;
};
+ [inline_doc] dictionary InvalidTokenDetails {
+ // The specific token that should be removed from the cache.
+ DOMString token;
+ };
+
[inline_doc] dictionary WebAuthFlowDetails {
// The URL that initiates the auth flow.
DOMString url;
@@ -31,6 +36,7 @@ namespace experimental.identity {
};
callback GetAuthTokenCallback = void (optional DOMString token);
+ callback InvalidateAuthTokenCallback = void ();
callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl);
interface Functions {
@@ -42,6 +48,16 @@ namespace experimental.identity {
static void getAuthToken(optional TokenDetails details,
GetAuthTokenCallback callback);
+ // Removes an OAuth2 access token from the Identity API's token cache.
+ // When an access token is discovered to be invalid, it should be
+ // passed to removeCachedAuthToken to remove it from the cache. The
+ // app may then retrieve a fresh token with getAuthToken.
+ //
+ // |details| : Token information.
+ // |callback| : Called when the token has been removed from the cache.
+ static void removeCachedAuthToken(InvalidTokenDetails details,
+ InvalidateAuthTokenCallback callback);
+
// Starts an auth flow at the specified URL.
//
// |details| : WebAuth flow options.
« no previous file with comments | « chrome/browser/extensions/extension_function_histogram_value.h ('k') | google_apis/gaia/oauth2_mint_token_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698