Commit d24b1ced authored by kharade's avatar kharade

clang formating

parent 11678473
...@@ -44,10 +44,8 @@ bool nrf_jwt::generate_signature( ...@@ -44,10 +44,8 @@ bool nrf_jwt::generate_signature(
get_secret_key(scope, nf_type, target_nf_type, key); get_secret_key(scope, nf_type, target_nf_type, key);
// Create JWT object // Create JWT object
// TODO // TODO
jwt::jwt_object obj{ jwt::jwt_object obj{jwt::params::algorithm("HS256"),
jwt::params::algorithm("HS256"), jwt::params::payload({{"iss", nrf_instance_id},
jwt::params::payload(
{{"iss", nrf_instance_id},
{"sub", nf_consumer_id}, {"sub", nf_consumer_id},
{"aud", target_nf_type}, {"aud", target_nf_type},
{"scope", scope}, {"scope", scope},
...@@ -68,10 +66,8 @@ bool nrf_jwt::generate_signature( ...@@ -68,10 +66,8 @@ bool nrf_jwt::generate_signature(
get_secret_key(scope, target_nf_instance_Id, key); get_secret_key(scope, target_nf_instance_Id, key);
// Create JWT object // Create JWT object
// TODO // TODO
jwt::jwt_object obj{ jwt::jwt_object obj{jwt::params::algorithm("HS256"),
jwt::params::algorithm("HS256"), jwt::params::payload({{"iss", nrf_instance_id},
jwt::params::payload(
{{"iss", nrf_instance_id},
{"sub", nf_consumer_id}, {"sub", nf_consumer_id},
{"aud", target_nf_instance_Id}, {"aud", target_nf_instance_Id},
{"scope", scope}, {"scope", scope},
...@@ -107,8 +103,8 @@ void nrf_jwt::test_jwt() { ...@@ -107,8 +103,8 @@ void nrf_jwt::test_jwt() {
auto key = "secret"; // Secret to use for the algorithm auto key = "secret"; // Secret to use for the algorithm
// Create JWT object // Create JWT object
jwt::jwt_object obj{ jwt::jwt_object obj{algorithm("HS256"), payload({{"some", "payload"}}),
algorithm("HS256"), payload({{"some", "payload"}}), secret(key)}; secret(key)};
// Get the encoded string/assertion // Get the encoded string/assertion
auto enc_str = obj.signature(); auto enc_str = obj.signature();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment