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

Side by Side Diff: mojo/services/vanadium/security/interfaces/principal.mojom

Issue 1454113003: Require an explicit ServiceName annotation for interfaces in C++. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. Use of this 1 // Copyright 2015 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 module vanadium; 5 module vanadium;
6 6
7 // Represents the name of an application. |url| is the url of the application. 7 // Represents the name of an application. |url| is the url of the application.
8 // |qualifier| is a string that allows to tie a specific instance of an 8 // |qualifier| is a string that allows to tie a specific instance of an
9 // application to another. 9 // application to another.
10 struct AppInstanceName { 10 struct AppInstanceName {
(...skipping 17 matching lines...) Expand all
28 array<uint8> blessing; 28 array<uint8> blessing;
29 // TODO(ataly, ukode): Include the name of the identity provider? 29 // TODO(ataly, ukode): Include the name of the identity provider?
30 // TODO(ataly, ukode): Include the first and last name of the user? 30 // TODO(ataly, ukode): Include the first and last name of the user?
31 // TODO(ataly, ukode): Include any unique ids assigned to the user by the 31 // TODO(ataly, ukode): Include any unique ids assigned to the user by the
32 // identity provider? 32 // identity provider?
33 }; 33 };
34 34
35 // A service that binds user identities to an application instance running in 35 // A service that binds user identities to an application instance running in
36 // Mojo. An application instance may have multiple user identities with one of 36 // Mojo. An application instance may have multiple user identities with one of
37 // them set as the current identity. 37 // them set as the current identity.
38 [ServiceName="vanadium::PrincipalService"]
38 interface PrincipalService { 39 interface PrincipalService {
39 // Login is called by an application instance (requestor_url/qualifier) that 40 // Login is called by an application instance (requestor_url/qualifier) that
40 // wants to get a new user identity. The service may obtain the user identity 41 // wants to get a new user identity. The service may obtain the user identity
41 // through a third-party authentication flow (e.g., oauth2) which may involve 42 // through a third-party authentication flow (e.g., oauth2) which may involve
42 // user intervention. The obtained identity is added to the set of 43 // user intervention. The obtained identity is added to the set of
43 // authenticated user identities of the application instance, and is also set 44 // authenticated user identities of the application instance, and is also set
44 // as the current user identity for the application instance. 45 // as the current user identity for the application instance.
45 // 46 //
46 // Additionally, the service creates a user blessing that binds the obtained 47 // Additionally, the service creates a user blessing that binds the obtained
47 // email address of the user to the unique public/private key-pair of the 48 // email address of the user to the unique public/private key-pair of the
(...skipping 18 matching lines...) Expand all
66 // instance. The provided identity must be present in the set of logged-in 67 // instance. The provided identity must be present in the set of logged-in
67 // user identities for the application instance, otherwise an error is 68 // user identities for the application instance, otherwise an error is
68 // returned. 69 // returned.
69 SetUser(User user) => (string? error); 70 SetUser(User user) => (string? error);
70 71
71 // GetLoggedInUsers returns all authenticated user identities of the calling 72 // GetLoggedInUsers returns all authenticated user identities of the calling
72 // application instance. The user identities are a result of previous Login 73 // application instance. The user identities are a result of previous Login
73 // calls by the application instance. 74 // calls by the application instance.
74 GetLoggedInUsers() => (array<User> ids); 75 GetLoggedInUsers() => (array<User> ids);
75 }; 76 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698