Thalhammer / jwt-cpp

A header only library for creating and validating json web tokens in c++
https://thalhammer.github.io/jwt-cpp/
MIT License
856 stars 233 forks source link

Change the defaults.h to make more easy to use #303

Closed Derrity closed 1 year ago

Derrity commented 1 year ago

What would you like to see added?

inline decoded_jwt decode(std::basic_string<char, std::char_traits, std::allocator> token)

Additional Context

change

inline decoded_jwt<traits::kazuho_picojson> decode(algorithm::hs256 token)

to

inline decoded_jwt<traits::kazuho_picojson> decode(std::basic_string<char, std::char_traits<char>, std::allocator<char>> token)

then we can use this directly

auto decoded = jwt::decode(token)