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

Unified Diff: services/authentication/credentials_impl_db.mojom

Issue 1466733002: Google OAuth Device Flow support for FNL (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebased to master Created 4 years, 10 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/credentials_impl_db.mojom
diff --git a/services/authentication/credentials_impl_db.mojom b/services/authentication/credentials_impl_db.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..7209de5686dcd181a7fbd4f0a5397dcd4b1cd1d4
--- /dev/null
+++ b/services/authentication/credentials_impl_db.mojom
@@ -0,0 +1,45 @@
+// Copyright 2016 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.
+
+module authentication;
+
+// Specifies if the type of stored credential is a plain text password,
+// password in encrypted form, fully scoped master OAuth token or
+// downscoped OAuth token.
+enum CredentialType {
+ PLAIN_PASSWORD = 1,
+ ENCRYPTED_PASSWORD,
+ FULL_SCOPED_OAUTH_REFRESH_TOKEN,
+ DOWNSCOPED_OAUTH_REFRESH_TOKEN
qsr 2016/03/04 15:06:46 Can you remove everything we do not use?
ukode 2016/03/11 22:48:52 Done.
+};
+
+enum AuthProvider {
+ GOOGLE = 1,
+ FACEBOOK,
+ TWITTER
qsr 2016/03/04 15:06:45 Same here.
ukode 2016/03/11 22:48:52 Done.
+};
+
+// This struct is used to persist long lived credentials for each user and is
+// not passed between services.
+struct Credentials {
+ // The type of authentication service provider such as Google, Facebook,
+ // Twitter, or Amazon.
+ AuthProvider auth_provider;
+ // Password or equivalent token grant that acts as the key to user data such
+ // as encrypted password or fully scoped master OAuth token.
+ string token;
+ // Type of stored credential.
+ CredentialType credential_type;
+ // List of permissible scopes for this saved grant.
+ string scopes;
+};
+
+// Database for the credentials database implementation.
+struct CredentialStore {
+ // Version of the database.
+ uint32 version;
+ // Map from user account to credentials. User account is identified by a
+ // user's unique account name such as email id.
+ map<string, Credentials> credentials;
+};

Powered by Google App Engine
This is Rietveld 408576698