Change interface of ClaimRootClientAuthToken and ConfirmAuthToken
Add RootClientTokenOwner argument to check if this owner can claim
device.
Add ErrorPtr to return error in privet response.
BUG=25766815
Change-Id: I508c934e23092514e37b1f4790f0f1e693583ae1
Reviewed-on: https://weave-review.googlesource.com/1939
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/privet/security_delegate.h b/src/privet/security_delegate.h
index 3446c48..adc582d 100644
--- a/src/privet/security_delegate.h
+++ b/src/privet/security_delegate.h
@@ -35,11 +35,11 @@
virtual std::set<CryptoType> GetCryptoTypes() const = 0;
// Returns Root Client Authorization Token.
- virtual std::string ClaimRootClientAuthToken() = 0;
+ virtual std::string ClaimRootClientAuthToken(ErrorPtr* error) = 0;
// Confirms pending pending token claim or checks that token is valid for the
// active secret.
- virtual bool ConfirmAuthToken(const std::string& token) = 0;
+ virtual bool ConfirmAuthToken(const std::string& token, ErrorPtr* error) = 0;
// Returns true if |auth_code| provided by client is valid. Client should
// obtain |auth_code| during pairing process.