cpp-jwt icon indicating copy to clipboard operation
cpp-jwt copied to clipboard

Allow jwt::params::algorithms with enum values

Open GeneratedNickname opened this issue 4 years ago • 0 comments

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));

GeneratedNickname avatar Oct 20 '21 11:10 GeneratedNickname