aboutsummaryrefslogtreecommitdiff
path: root/src/device_manager.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-02-22 17:43:15 -0800
committerVitaly Buka <vitalybuka@google.com>2016-02-23 20:10:52 +0000
commitb612e3cea994a6ea905baacfe2aab1ecc9e2027e (patch)
tree9777b204aebc3ef67ddbf3d3102ddcb103085463 /src/device_manager.cc
parentd1d52e79eb282d47fb7290e02830d53da67e119b (diff)
downloadlibweave-b612e3cea994a6ea905baacfe2aab1ecc9e2027e.tar.gz
Reset access token secret on new black list entry
To avoid checking all access tokens against black list, we just invalidate all of them to make clients to go through auth API. BUG:27300728 Change-Id: Iddf08e076037469db9dc859288645a8fe2991914 Reviewed-on: https://weave-review.googlesource.com/2708 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'src/device_manager.cc')
-rw-r--r--src/device_manager.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/device_manager.cc b/src/device_manager.cc
index 4c0d3ee..aebda67 100644
--- a/src/device_manager.cc
+++ b/src/device_manager.cc
@@ -33,8 +33,12 @@ DeviceManager::DeviceManager(provider::ConfigStore* config_store,
: config_{new Config{config_store}},
component_manager_{new ComponentManagerImpl{task_runner}} {
if (http_server) {
- auth_manager_.reset(new privet::AuthManager(
- config_.get(), http_server->GetHttpsCertificateFingerprint()));
+ black_list_manager_.reset(new AccessBlackListManagerImpl{config_store});
+ auth_manager_.reset(
+ new privet::AuthManager(config_.get(), black_list_manager_.get(),
+ http_server->GetHttpsCertificateFingerprint()));
+ access_api_handler_.reset(
+ new AccessApiHandler{this, black_list_manager_.get()});
}
device_info_.reset(new DeviceRegistrationInfo(
@@ -42,10 +46,6 @@ DeviceManager::DeviceManager(provider::ConfigStore* config_store,
network, auth_manager_.get()));
base_api_handler_.reset(new BaseApiHandler{device_info_.get(), this});
- black_list_manager_.reset(new AccessBlackListManagerImpl{config_store});
- access_api_handler_.reset(
- new AccessApiHandler{this, black_list_manager_.get()});
-
device_info_->Start();
if (http_server) {