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..8128e5684cfbf7190e442fc84220896c3de05f65 |
--- /dev/null |
+++ b/services/authentication/credentials_impl_db.mojom |
@@ -0,0 +1,41 @@ |
+// 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 { |
+ DOWNSCOPED_OAUTH_REFRESH_TOKEN = 1 |
+}; |
+ |
+// Specifies the type of identity provider for authenticating user. |
+enum AuthProvider { |
+ GOOGLE = 1 |
+}; |
+ |
+// 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; |
+}; |