Make secret an optional argument for decode

This commit is contained in:
Arun M 2017-12-26 20:20:53 +05:30
parent 6c2bbe9ad0
commit 99f3c1db86
6 changed files with 48 additions and 20 deletions

View file

@ -730,6 +730,9 @@ private: // private APIs
public: //TODO: Not good
/// Decode parameters
template <typename DecodeParams, typename... Rest>
static void set_decode_params(DecodeParams& dparams, params::detail::secret_param s, Rest&&... args);
template <typename DecodeParams, typename... Rest>
static void set_decode_params(DecodeParams& dparams, params::detail::leeway_param l, Rest&&... args);
@ -766,7 +769,6 @@ jwt_object jwt_decode(const string_view encoded_str, const string_view key, bool
*/
template <typename SequenceT, typename... Args>
jwt_object decode(const string_view enc_str,
const string_view key,
const params::detail::algorithms_param<SequenceT>& algos,
std::error_code& ec,
Args&&... args);
@ -775,7 +777,6 @@ jwt_object decode(const string_view enc_str,
*/
template <typename SequenceT, typename... Args>
jwt_object decode(const string_view enc_str,
const string_view key,
const params::detail::algorithms_param<SequenceT>& algos,
Args&&... args);