mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Make secret an optional argument for decode
This commit is contained in:
parent
6c2bbe9ad0
commit
99f3c1db86
6 changed files with 48 additions and 20 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue