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

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

Issue 1391243003: Move //mojo/services/X/public/... to //mojo/services/X/... (part 4). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_3-x-no_public_2-x-no_public_1
Patch Set: copyright header Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module vanadium;
6
7 // Represents the name of an application. |url| is the url of the
8 // application. |qualifier| is a string that allows to tie a specific
9 // instance of an application to another.
10 struct AppInstanceName {
11 string url;
12 string? qualifier;
13 };
14
15 // Certificate represents a human-readable name and public-key (DER encoded) pai r.
16 // The private-key for a certificate is only available for signing operations
17 // within the principal service application.
18 struct Certificate {
19 string extension;
20 array<uint8>? publickey;
21 };
22
23 // Blessing is a credential binding a user identity to a public key. The corresp onding
24 // private key is only available for signing within the PrincipalService applica tion.
25 struct Blessing {
26 array<Certificate> chain;
27 };
28
29 // ChainSeparator is the separator used to join name extensions in a certificate chain.
30 const string ChainSeparator = "/";
31
32 // A service that binds user identities to an application instance running in Mo jo
33 interface PrincipalService {
34 // Login is called by an application instance (requestor_url/qualifier) that
35 // wants to get a user blessing. The service may obtain the user blessing
36 // through a third-party authentication flow (eg:oauth2). The user blessing
37 // is bound to a public/private key-pair that this service generates and
38 // persists for this application instance. Returns null if login fails.
39 Login() => (Blessing? user_blessing);
40
41 // Removes the user blessing for the application instance that invokes the
42 // Logout method.
43 Logout();
44
45 // GetUserBlessing returns the user blessing for a given application instance.
46 // It returns an error if the application instance has not invoked Login().
47 GetUserBlessing(AppInstanceName app) => (Blessing? user_blessing);
48 };
49
OLDNEW
« no previous file with comments | « mojo/services/vanadium/security/public/interfaces/BUILD.gn ('k') | mojo/services/view_manager/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698