mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Readme changes for example code and fixed header decoding
This commit is contained in:
parent
1236071a4f
commit
6302055db1
22 changed files with 1077 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue