arun11299 / cpp-jwt

JSON Web Token library for C++
MIT License
387 stars 112 forks source link

Allow jwt::params::algorithms with enum values #91

Open GeneratedNickname opened 2 years ago

GeneratedNickname commented 2 years ago

Currently needed:

const auto obj = jwt::decode(enc_str, jwt::params::algorithms({jwt::alg_to_str(jwt::algorithm::HS256), jwt::alg_to_str(jwt::algorithm::HS512)}), jwt::params::secret(key));

Expected:

const auto obj = jwt::decode(enc_str, jwt::params::algorithms({jwt::algorithm::HS256, jwt::algorithm::HS512}), jwt::params::secret(key));