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

Side by Side Diff: components/proximity_auth/cryptauth/proto/cryptauth_api.proto

Issue 738593002: Introduce CryptAuthClient, a class capable of performing all CryptAuth APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Definitions for CryptAuth API calls. 5 // Definitions for CryptAuth API calls.
6 // Generated from server definitions. Do not edit. 6 // Generated from server definitions. Do not edit.
7 syntax = "proto2"; 7 syntax = "proto2";
8 8
9 package cryptauth; 9 package cryptauth;
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 // Request for a list of devices that could be used as Unlock Keys, optionally 32 // Request for a list of devices that could be used as Unlock Keys, optionally
33 // requesting a callback over bluetooth (for proximity detection). 33 // requesting a callback over bluetooth (for proximity detection).
34 message FindEligibleUnlockDevicesRequest { 34 message FindEligibleUnlockDevicesRequest {
35 // A bluetooth MAC address to be contacted if a device that may be eligible 35 // A bluetooth MAC address to be contacted if a device that may be eligible
36 // for unlock is nearby. If set, a message will be pushed to all eligible 36 // for unlock is nearby. If set, a message will be pushed to all eligible
37 // unlock devices requesting that they contact the specified MAC address. If 37 // unlock devices requesting that they contact the specified MAC address. If
38 // this field is left unset, no callback will be made, and no message will be 38 // this field is left unset, no callback will be made, and no message will be
39 // pushed to the user's devices. 39 // pushed to the user's devices.
40 optional string callback_bluetooth_address = 2; 40 optional string callback_bluetooth_address = 2;
41
42 // Identifies what kind of resource this is. Value: the fixed string
43 // <code>"cryptauth#findEligibleUnlockDevicesRequest"</code>.
44 optional string kind = 3;
45 } 41 }
46 42
47 // Response containing a list of devices that could be made Unlock Keys 43 // Response containing a list of devices that could be made Unlock Keys
48 message FindEligibleUnlockDevicesResponse { 44 message FindEligibleUnlockDevicesResponse {
49 // Devices that could be made Unlock Keys (even if they aren't enabled yet) 45 // Devices that could be made Unlock Keys (even if they aren't enabled yet)
50 repeated ExternalDeviceInfo eligible_devices = 1; 46 repeated ExternalDeviceInfo eligible_devices = 1;
51 47
52 // Devices that cannot be made unlock keys, and reasons for this. This list 48 // Devices that cannot be made unlock keys, and reasons for this. This list
53 // will not contain any non-gms core devices, even though these are also not 49 // will not contain any non-gms core devices, even though these are also not
54 // eligible to be unlock keys. 50 // eligible to be unlock keys.
55 repeated IneligibleDevice ineligible_devices = 2; 51 repeated IneligibleDevice ineligible_devices = 2;
56
57 // Identifies what kind of resource this is. Value: the fixed string
58 // <code>"cryptauth#findEligibleUnlockDevicesResponse"</code>.
59 optional string kind = 3;
60 } 52 }
61 53
62 // Request to complete a device enrollment. 54 // Request to complete a device enrollment.
63 message FinishEnrollmentRequest { 55 message FinishEnrollmentRequest {
64 // The enrollment session identifer from the <code>setup</code> response. 56 // The enrollment session identifer from the <code>setup</code> response.
65 optional bytes enrollment_session_id = 2; 57 optional bytes enrollment_session_id = 2;
66 58
67 // An encrypted payload containing enrollment information for the device. 59 // An encrypted payload containing enrollment information for the device.
68 optional bytes enrollment_message = 3; 60 optional bytes enrollment_message = 3;
69 61
70 // A Diffie-Hellman public key for the device, to complete the key exchange. 62 // A Diffie-Hellman public key for the device, to complete the key exchange.
71 optional bytes device_ephemeral_key = 4; 63 optional bytes device_ephemeral_key = 4;
72 } 64 }
73 65
74 // Response indicating whether a device enrollment completed successfully. 66 // Response indicating whether a device enrollment completed successfully.
75 message FinishEnrollmentResponse { 67 message FinishEnrollmentResponse {
76 // Status should be OK if the request was successful. 68 // Status should be OK if the request was successful.
77 optional string status = 1; 69 optional string status = 1;
78 70
79 // A detailed error message if there was a failure. 71 // A detailed error message if there was a failure.
80 optional string error_message = 2; 72 optional string error_message = 2;
81
82 // Identifies what kind of resource this is. Value: the fixed string
83 // <code>"cryptauth#finishEnrollmentResponse"</code>.
84 optional string kind = 5;
85 } 73 }
86 74
87 // Used to request devices that have a specific feature. 75 // Used to request devices that have a specific feature.
88 message GetDevicesForFeatureRequest { 76 message GetDevicesForFeatureRequest {
89 // Requests those devices that support the specified DeviceFeature 77 // Requests those devices that support the specified DeviceFeature
90 optional string device_feature = 2; 78 optional string device_feature = 2;
91 } 79 }
92 80
93 // Devices that have a certain feature, as returned by the GetDevicesForFeature 81 // Devices that have a certain feature, as returned by the GetDevicesForFeature
94 // RPC. 82 // RPC.
95 message GetDevicesForFeatureResponse { 83 message GetDevicesForFeatureResponse {
96 // A (possibly empty) list of devices supporting the requested feature. 84 // A (possibly empty) list of devices supporting the requested feature.
97 repeated ExternalDeviceInfo result_sets = 1; 85 repeated ExternalDeviceInfo result_sets = 1;
98
99 // Identifies what kind of resource this is. Value: the fixed string
100 // <code>"cryptauth#getDevicesForFeatureResponse"</code>.
101 optional string kind = 2;
102 } 86 }
103 87
104 // Request for a listing of a user's own devices 88 // Request for a listing of a user's own devices
105 message GetMyDevicesRequest { 89 message GetMyDevicesRequest {
106 // Return only devices that can act as EasyUnlock keys. 90 // Return only devices that can act as EasyUnlock keys.
107 optional bool approved_for_unlock_required = 2; 91 optional bool approved_for_unlock_required = 2;
108 92
109 // Identifies what kind of resource this is. Value: the fixed string 93 // Allow the returned list to be somewhat out of date (read will be faster)
110 // <code>"cryptauth#getMyDevicesRequest"</code>. 94 optional bool allow_stale_read = 3 [default = false];
111 optional string kind = 3;
112 } 95 }
113 96
114 // Response containing a listing of the users device's 97 // Response containing a listing of the users device's
115 message GetMyDevicesResponse { 98 message GetMyDevicesResponse {
116 // A listing of all sync-able devices 99 // A listing of all sync-able devices
117 repeated ExternalDeviceInfo devices = 1; 100 repeated ExternalDeviceInfo devices = 1;
118
119 // Identifies what kind of resource this is. Value: the fixed string
120 // <code>"cryptauth#getMyDevicesResponse"</code>.
121 optional string kind = 2;
122 } 101 }
123 102
124 // A device that the server thinks is not eligible to be an unlock key, and the 103 // A device that the server thinks is not eligible to be an unlock key, and the
125 // reason for this. 104 // reason for this.
126 message IneligibleDevice { 105 message IneligibleDevice {
127 // The device that is not eligible to be an unlock key. 106 // The device that is not eligible to be an unlock key.
128 optional ExternalDeviceInfo device = 1; 107 optional ExternalDeviceInfo device = 1;
129 108
130 // The reasons why the server thinks it is not an unlock key. NOTE: for now, 109 // The reasons why the server thinks it is not an unlock key. NOTE: for now,
131 // this list of reasons will contain exactly one element. It is a repeated 110 // this list of reasons will contain exactly one element. It is a repeated
132 // field because, in principle, there can be more than one reason that makes a 111 // field because, in principle, there can be more than one reason that makes a
133 // device not eligible to be an unlock key, and we want to be able to add 112 // device not eligible to be an unlock key, and we want to be able to add
134 // multiple reasons in the future. 113 // multiple reasons in the future.
135 repeated string reasons = 2; 114 repeated string reasons = 2;
136 } 115 }
137 116
138 // Requests to send a "tickle" requesting to sync all of a user's devices now 117 // Requests to send a "tickle" requesting to sync all of a user's devices now
139 message SendDeviceSyncTickleRequest { 118 message SendDeviceSyncTickleRequest {
140 // Identifies what kind of resource this is. Value: the fixed string 119 }
141 // <code>"cryptauth#sendDeviceSyncTickleRequest"</code>. 120
142 optional string kind = 2; 121 message SendDeviceSyncTickleResponse {
122 // empty for now
143 } 123 }
144 124
145 // Contains information needed to begin a device enrollment. 125 // Contains information needed to begin a device enrollment.
146 message SetupEnrollmentInfo { 126 message SetupEnrollmentInfo {
147 // Type of protocol this setup information was requested for 127 // Type of protocol this setup information was requested for
148 optional string type = 1; 128 optional string type = 1;
149 129
150 // A session identifier to be used for this enrollment session. 130 // A session identifier to be used for this enrollment session.
151 optional bytes enrollment_session_id = 2; 131 optional bytes enrollment_session_id = 2;
152 132
(...skipping 18 matching lines...) Expand all
171 optional string application_id = 5; 151 optional string application_id = 5;
172 } 152 }
173 153
174 // Contains information needed to begin a device enrollment. 154 // Contains information needed to begin a device enrollment.
175 message SetupEnrollmentResponse { 155 message SetupEnrollmentResponse {
176 // Should return OK if the request was well formed. 156 // Should return OK if the request was well formed.
177 optional string status = 1; 157 optional string status = 1;
178 158
179 // Information for each of the requested protocol <code>type</code>s. 159 // Information for each of the requested protocol <code>type</code>s.
180 repeated SetupEnrollmentInfo infos = 2; 160 repeated SetupEnrollmentInfo infos = 2;
181
182 // Identifies what kind of resource this is. Value: the fixed string
183 // <code>"cryptauth#setupEnrollmentResponse"</code>.
184 optional string kind = 3;
185 } 161 }
186 162
187 // Used to enable or disable EasyUnlock features on a specified device, and also 163 // Used to enable or disable EasyUnlock features on a specified device, and also
188 // causes other devices to sync the new EasyUnlock state. 164 // causes other devices to sync the new EasyUnlock state.
189 message ToggleEasyUnlockRequest { 165 message ToggleEasyUnlockRequest {
190 // If true, Easy Unlock will be enabled for the device with public key equal 166 // If true, Easy Unlock will be enabled for the device with public key equal
191 // to public_key. Otherwise, it will be disabled for that device. 167 // to public_key. Otherwise, it will be disabled for that device.
192 optional bool enable = 1; 168 optional bool enable = 1;
193 169
194 // Encoded public key of the device to enable/disable (here you must use the 170 // Encoded public key of the device to enable/disable (here you must use the
195 // same exact encoding that was sent during device enrollment). 171 // same exact encoding that was sent during device enrollment).
196 optional bytes public_key = 2; 172 optional bytes public_key = 2;
197 173
198 // If true, EasyUnlock enabled state will be set to the value of "enable" for 174 // If true, EasyUnlock enabled state will be set to the value of "enable" for
199 // all of a user's devices. This is the same as calling the toggle RPC for 175 // all of a user's devices. This is the same as calling the toggle RPC for
200 // every device. However, this removes the need for calling GetMyDevices, so 176 // every device. However, this removes the need for calling GetMyDevices, so
201 // it reduces network overhead. If this field is set "public_key" must not be 177 // it reduces network overhead. If this field is set "public_key" must not be
202 // set. NOTE: the case enable=true is not yet supported, so this option can 178 // set. NOTE: the case enable=true is not yet supported, so this option can
203 // only disable EasyUnlock for all devices. 179 // only disable EasyUnlock for all devices.
204 optional bool apply_to_all = 3; 180 optional bool apply_to_all = 3;
181 }
205 182
206 // Identifies what kind of resource this is. Value: the fixed string 183 message ToggleEasyUnlockResponse {
207 // <code>"cryptauth#toggleEasyUnlockRequest"</code>. 184 // empty for now
208 optional string kind = 4;
209 } 185 }
OLDNEW
« no previous file with comments | « components/proximity_auth/cryptauth/cryptauth_client_unittest.cc ('k') | components/proximity_auth/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698