mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Fix tests to compile #9
This commit is contained in:
parent
32099f6691
commit
d60dd2c926
18 changed files with 14 additions and 10 deletions
|
@ -14,11 +14,14 @@ void basic_decode_test()
|
|||
jp.add_claim("admin", true);
|
||||
|
||||
jwt::jwt_signature sgn{"secret"};
|
||||
auto res = sgn.encode(hdr, jp);
|
||||
std::error_code ec{};
|
||||
auto res = sgn.encode(hdr, jp, ec);
|
||||
std::cout << res << std::endl;
|
||||
|
||||
using namespace jwt::params;
|
||||
|
||||
std::cout << "DECODE: \n";
|
||||
jwt::jwt_decode(res, "secret");
|
||||
jwt::decode(res, algorithms({"none", "hs256"}), ec, verify(false), secret("secret"));
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue