Skip to content

Commit

Permalink
Use operator[] instead of front to support jsoncpp
Browse files Browse the repository at this point in the history
Replace the `front()` with `[0]` as front is not supported by jsoncpp on
array types.

Signed-off-by: Omar Mohamed <[email protected]>
  • Loading branch information
omar-mohamed-khallaf committed Sep 21, 2024
1 parent 83703d7 commit dfa7d29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/jwt-cpp/jwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -3925,7 +3925,7 @@ namespace jwt {
auto x5c_array = get_jwk_claim("x5c").as_array();
if (x5c_array.size() == 0) throw error::claim_not_present_exception();

return json_traits::as_string(x5c_array.front());
return json_traits::as_string(x5c_array[0]);
};

/**
Expand Down

0 comments on commit dfa7d29

Please sign in to comment.