Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lo-simon committed Feb 21, 2024
1 parent 0564ffb commit 606b8ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
11 changes: 7 additions & 4 deletions Development/nmos-cpp-node/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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<nmos::host_port, web::http::experimental::listener::api_router> api_routers;
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions Development/nmos-cpp-registry/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 606b8ed

Please sign in to comment.