summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/gcd_private.idl
diff options
context:
space:
mode:
authornoamsml <noamsml@chromium.org>2014-08-26 14:55:55 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-26 21:57:27 +0000
commit18d64ecb4fc72171c55498ee507682085c684e01 (patch)
tree7914bcd17013b980efa36cb349699071d2f22b92 /chrome/common/extensions/api/gcd_private.idl
parent6b6cd502e50d93232afee8f993dc47a563f74c84 (diff)
downloadchromium_src-18d64ecb4fc72171c55498ee507682085c684e01.zip
chromium_src-18d64ecb4fc72171c55498ee507682085c684e01.tar.gz
chromium_src-18d64ecb4fc72171c55498ee507682085c684e01.tar.bz2
API change to allow sticker authentication for devices
Change API to match protocol that may allow sticker authentication for devices. The PIN will not necessarily be available at provision time, and the client will need to send a user-typed PIN at code verification time. BUG= Review URL: https://codereview.chromium.org/468613003 Cr-Commit-Position: refs/heads/master@{#291988}
Diffstat (limited to 'chrome/common/extensions/api/gcd_private.idl')
-rw-r--r--chrome/common/extensions/api/gcd_private.idl25
1 files changed, 19 insertions, 6 deletions
diff --git a/chrome/common/extensions/api/gcd_private.idl b/chrome/common/extensions/api/gcd_private.idl
index 918a80d..2f975fd 100644
--- a/chrome/common/extensions/api/gcd_private.idl
+++ b/chrome/common/extensions/api/gcd_private.idl
@@ -46,13 +46,25 @@ namespace gcdPrivate {
// Unknown session.
unknownSessionError,
+ // Bad confirmation code. Ask user to retype.
+ badConfirmationCodeError,
+
// Success.
success
};
enum ConfirmationType {
displayCode,
- audio
+ stickerCode
+ };
+
+ // Information regarding the confirmation of a device.
+ dictionary ConfirmationInfo {
+ // Type of confirmation.
+ ConfirmationType type;
+
+ // Code if available.
+ DOMString? code;
};
callback CloudDeviceListCallback = void(GCDDevice[] devices);
@@ -75,12 +87,10 @@ namespace gcdPrivate {
// Called when the confirmation code is available or on error.
// |sessionId| is the session ID (identifies the session for future calls)
// |status| is the status (success or type of error)
- // |code| is the confirmation code or empty on error
- // |confirmationType| is the type of confirmation required
+ // |confirmation| is the information about the confirmation.
callback ConfirmationCodeCallback = void(long sessionId,
Status status,
- DOMString code,
- ConfirmationType type);
+ ConfirmationInfo confirmation);
// Called to indicated the session is established.
// |status| is the status (success or type of error)
@@ -124,8 +134,11 @@ namespace gcdPrivate {
long port,
ConfirmationCodeCallback callback);
- // Confirm that the code is correct. Device will still need to confirm.
+ // Send confirmation code. Device will still need to confirm. |code| must be
+ // present and must match the code from the device, even when the code is
+ // supplied in the |ConfirmationInfo| object.
static void confirmCode(long sessionId,
+ DOMString code,
SessionEstablishedCallback callback);
// Send an encrypted message to the device. |api| is the API path and