Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc committed May 28, 2020
1 parent f271133 commit b0161d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/jwt-cpp/jwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,8 @@ namespace jwt {
template<typename Algo, typename Encode>
std::string sign(const Algo& algo, Encode encode) const {
object_type obj_header = header_claims;
obj_header["alg"] = value_type(algo.name()); // If present in builder header claims, this will be overwritte
if(header_claims.count("alg") == 0)
obj_header["alg"] = value_type(algo.name());

string_type header = encode(traits::serialize(value_type(obj_header)));
string_type payload = encode(traits::serialize(value_type(payload_claims)));
Expand Down

0 comments on commit b0161d8

Please sign in to comment.