aboutsummaryrefslogtreecommitdiff
path: root/src/privet/privet_handler.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2015-12-14 23:24:13 -0800
committerVitaly Buka <vitalybuka@google.com>2015-12-15 19:58:21 +0000
commitc3bc82a29cdff05d67d3b583ca0bc25df96ab382 (patch)
tree125f744f314a568b00b9bb4081f0ecd42d2a5e96 /src/privet/privet_handler.cc
parent4ab500249f346a9fcfe084ee1619a39259f7471c (diff)
downloadlibweave-c3bc82a29cdff05d67d3b583ca0bc25df96ab382.tar.gz
Check if device already claimed
Client can claim only unclaimed device. Cloud can claim any device. Claim with kNone is not allowed. BUG=25766815, 26143922 Change-Id: Id92168b7f7c290509e672a659f09b7d06af37b76 Reviewed-on: https://weave-review.googlesource.com/1960 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'src/privet/privet_handler.cc')
-rw-r--r--src/privet/privet_handler.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/privet/privet_handler.cc b/src/privet/privet_handler.cc
index 86a2a85..b435435 100644
--- a/src/privet/privet_handler.cc
+++ b/src/privet/privet_handler.cc
@@ -153,6 +153,7 @@ struct {
{errors::kInvalidState, http::kInternalServerError},
{errors::kNotFound, http::kNotFound},
{errors::kNotImplemented, http::kNotSupported},
+ {errors::kAlreadyClaimed, http::kDenied},
};
AuthScope AuthScopeFromString(const std::string& scope, AuthScope auto_scope) {