Readme changes for example code and fixed header decoding

This commit is contained in:
Arun M 2017-12-29 16:26:37 +05:30
parent 1236071a4f
commit 6302055db1
22 changed files with 1077 additions and 6 deletions

View file

@ -282,6 +282,14 @@ TEST (EncodeTest, HeaderParamTest)
EXPECT_TRUE (ret);
std::cout << obj.header() << std::endl;
std::error_code ec;
auto enc_str = obj.signature();
auto dec_obj = jwt::decode(enc_str, algorithms({"none"}), ec, verify(false));
EXPECT_EQ (ec.value(), static_cast<int>(jwt::AlgorithmErrc::NoneAlgorithmUsed));
std::cout << dec_obj.header() << std::endl;
}
int main(int argc, char **argv)