Skip to content

Commit

Permalink
Fix nmos-cpp-node to run in non-auth mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lo-simon committed Dec 14, 2023
1 parent fb8609e commit d6614f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Development/nmos/node_behaviour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ namespace nmos
grain.updated = strictly_increasing_update(resources);
});

registration_client.reset(new web::http::client::http_client(base_uri, make_registration_client_config(model.settings, load_ca_certificates, get_authorization_bearer_token(), gate)));
registration_client.reset(new web::http::client::http_client(base_uri, make_registration_client_config(model.settings, load_ca_certificates, get_authorization_bearer_token ? get_authorization_bearer_token() : web::http::oauth2::experimental::oauth2_token{}, gate)));
}

events = web::json::value::array();
Expand Down Expand Up @@ -900,7 +900,7 @@ namespace nmos
const auto registry_version = parse_api_version(web::uri::split_path(base_uri.path()).back());
if (registry_version != grain->version) break;

const auto& bearer_token = get_authorization_bearer_token();
const auto bearer_token = get_authorization_bearer_token ? get_authorization_bearer_token() : web::http::oauth2::experimental::oauth2_token{};
registration_client.reset(new web::http::client::http_client(base_uri, make_registration_client_config(model.settings, load_ca_certificates, bearer_token, gate)));
heartbeat_client.reset(new web::http::client::http_client(base_uri, make_heartbeat_client_config(model.settings, load_ca_certificates, bearer_token, gate)));

Expand Down

0 comments on commit d6614f1

Please sign in to comment.