Commit d24b1ced authored by kharade's avatar kharade

clang formating

parent 11678473
......@@ -44,10 +44,8 @@ bool nrf_jwt::generate_signature(
get_secret_key(scope, nf_type, target_nf_type, key);
// Create JWT object
// TODO
jwt::jwt_object obj{
jwt::params::algorithm("HS256"),
jwt::params::payload(
{{"iss", nrf_instance_id},
jwt::jwt_object obj{jwt::params::algorithm("HS256"),
jwt::params::payload({{"iss", nrf_instance_id},
{"sub", nf_consumer_id},
{"aud", target_nf_type},
{"scope", scope},
......@@ -68,10 +66,8 @@ bool nrf_jwt::generate_signature(
get_secret_key(scope, target_nf_instance_Id, key);
// Create JWT object
// TODO
jwt::jwt_object obj{
jwt::params::algorithm("HS256"),
jwt::params::payload(
{{"iss", nrf_instance_id},
jwt::jwt_object obj{jwt::params::algorithm("HS256"),
jwt::params::payload({{"iss", nrf_instance_id},
{"sub", nf_consumer_id},
{"aud", target_nf_instance_Id},
{"scope", scope},
......@@ -107,8 +103,8 @@ void nrf_jwt::test_jwt() {
auto key = "secret"; // Secret to use for the algorithm
// Create JWT object
jwt::jwt_object obj{
algorithm("HS256"), payload({{"some", "payload"}}), secret(key)};
jwt::jwt_object obj{algorithm("HS256"), payload({{"some", "payload"}}),
secret(key)};
// Get the encoded string/assertion
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