mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Why does the existence of a signature algorithm entail a required verification? #24
This commit is contained in:
parent
b1140707cc
commit
87dcef903f
4 changed files with 29 additions and 29 deletions
|
@ -286,7 +286,7 @@ TEST (EncodeTest, HeaderParamTest)
|
|||
std::error_code ec;
|
||||
auto enc_str = obj.signature();
|
||||
|
||||
auto dec_obj = jwt::decode(enc_str, algorithms({"none"}), ec, verify(false));
|
||||
auto dec_obj = jwt::decode(enc_str, algorithms({"none"}), ec, verify(true));
|
||||
EXPECT_EQ (ec.value(), static_cast<int>(jwt::AlgorithmErrc::NoneAlgorithmUsed));
|
||||
|
||||
std::cout << dec_obj.header() << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue