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

Unified Diff: services/authentication/authentication.mojom

Issue 1116653002: Introduce authentication service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 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: services/authentication/authentication.mojom
diff --git a/services/authentication/authentication.mojom b/services/authentication/authentication.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..a69e7de1a6853fd4063327b18ceca504710ba8cd
--- /dev/null
+++ b/services/authentication/authentication.mojom
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+[JavaPackage="org.chromium.mojo.authentication"]
+module authentication;
+
+// Interface to handle user identity and authentication tokens.
+// TODO(qsr): This API only handles google accounts at this time. It will need
+// to be extended to allow generic account manager on the platform.
+interface AuthenticationService {
+ // Requests a Google account to use. In case of success, error will be null.
+ // In case of error, username will be null and error will contain a
+ // description of the error.
+ SelectAccount() => (string? username, string? error);
+
+ // Requests an oauth2 token for the given Google account with the given
+ // scopes. In case of error, username will be null and error will contain a
+ // description of the error.
+ GetOAuth2Token(string username, array<string> scopes) =>
+ (string? token, string? error);
+
+ // Requests to clear a previously acquired token. This should be called when a
+ // token is refused by a server component before requesting a new token to
+ // clear the token from any cache.
+ ClearOAuth2Token(string token);
+};
« no previous file with comments | « services/authentication/BUILD.gn ('k') | services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698