From 606b8ed5fcd2cb4b3d218816c7cbb23fcfc346bd Mon Sep 17 00:00:00 2001 From: lo-simon Date: Wed, 21 Feb 2024 11:17:53 +0000 Subject: [PATCH] Fix comments --- Development/nmos-cpp-node/main.cpp | 11 +++++++---- Development/nmos-cpp-registry/main.cpp | 8 +++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Development/nmos-cpp-node/main.cpp b/Development/nmos-cpp-node/main.cpp index 1d6c90ae..abc239e4 100644 --- a/Development/nmos-cpp-node/main.cpp +++ b/Development/nmos-cpp-node/main.cpp @@ -115,8 +115,11 @@ int main(int argc, char* argv[]) } #endif -// only implement communication with Authorization server if IS-10/BCP-003-02 is required -// cf. preprocessor conditions in nmos::make_node_api, nmos::make_connection_api, nmos::make_events_api, nmos::make_channelmapping_api, make_events_ws_validate_handler + // only configure communication with Authorization server if IS-10/BCP-003-02 is required + // Note: + // the validate_authorization callback must be set up before executing the make_node_server where make_node_api, make_connection_api, make_events_api, and make_channelmapping_api are set up + // the ws_validate_authorization callback must be set up before executing the make_node_server where make_events_ws_validate_handler is set up + // the get_authorization_bearer_token callback must be set up before executing the make_node_server where make_http_client_config is set up nmos::experimental::authorization_state authorization_state; if (nmos::experimental::fields::server_authorization(node_model.settings)) { @@ -153,7 +156,7 @@ int main(int argc, char* argv[]) } #endif -// only implement communication with Authorization server if IS-10/BCP-003-02 is required + // only configure communication with Authorization server if IS-10/BCP-003-02 is required if (nmos::experimental::fields::client_authorization(node_model.settings)) { std::map api_routers; @@ -214,7 +217,7 @@ int main(int argc, char* argv[]) } } -// only implement communication with Authorization server if IS-10/BCP-003-02 is required + // only configure communication with Authorization server if IS-10/BCP-003-02 is required if (nmos::experimental::fields::client_authorization(node_model.settings) || nmos::experimental::fields::server_authorization(node_model.settings)) { // IS-10 client registration, fetch access token, and fetch authorization server token public key diff --git a/Development/nmos-cpp-registry/main.cpp b/Development/nmos-cpp-registry/main.cpp index 645ff4de..a98b253b 100644 --- a/Development/nmos-cpp-registry/main.cpp +++ b/Development/nmos-cpp-registry/main.cpp @@ -111,8 +111,10 @@ int main(int argc, char* argv[]) } #endif -// only implement communication with Authorization server if IS-10/BCP-003-02 is required -// cf. preprocessor conditions in nmos::make_registration_api, nmos::make_query_api, nmos::make_query_ws_validate_handler, nmos::make_events_ws_validate_handler + // only configure communication with Authorization server if IS-10/BCP-003-02 is required + // Note: + // the validate_authorization callback must be set up before executing the make_node_server where make_node_api, make_connection_api, make_events_api, and make_channelmapping_api are set up + // the ws_validate_authorization callback must be set up before executing the make_node_server where make_events_ws_validate_handler is set up nmos::experimental::authorization_state authorization_state; if (nmos::experimental::fields::server_authorization(registry_model.settings)) { @@ -148,7 +150,7 @@ int main(int argc, char* argv[]) } #endif -// only implement communication with Authorization server if IS-10/BCP-003-02 is required + // only configure communication with Authorization server if IS-10/BCP-003-02 is required if (nmos::experimental::fields::server_authorization(registry_model.settings)) { auto load_ca_certificates = registry_implementation.load_ca_certificates;