ChawinTan / jwt-cpp

A header only library for creating and validating json web tokens in c++

Home Page:https://thalhammer.it/projects/jwt_cpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Click here to the documentation of the original repo

I changed the implementation of verify in jwt.h to return a boolean value after a token has been verified. Useful if branching is needed after toke verification.

auto verifier = jwt::verify()
    .allow_algorithm(jwt::algorithm::hs256{ "secret" })
    .with_issuer("auth0");

// returns true or false
bool ok = verifier.verify(decoded_token); 

About

A header only library for creating and validating json web tokens in c++

https://thalhammer.it/projects/jwt_cpp

License:MIT License


Languages

Language:C++ 99.3%Language:CMake 0.6%Language:Dockerfile 0.0%