mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 09:18:33 +00:00
Verification
This commit is contained in:
parent
796abd6e65
commit
81e6b2392e
8 changed files with 125 additions and 30 deletions
|
@ -25,7 +25,7 @@ using sign_func_t = sign_result_t (*) (const string_view key,
|
|||
const string_view data);
|
||||
///
|
||||
using verify_func_t = verify_result_t (*) (const string_view key,
|
||||
const string_view header,
|
||||
const string_view head,
|
||||
const string_view jwt_sign);
|
||||
|
||||
namespace algo {
|
||||
|
@ -215,7 +215,7 @@ struct HMACSign<algo::NONE>
|
|||
static verify_result_t
|
||||
verify(const string_view key, const string_view head, const string_view sign)
|
||||
{
|
||||
int compare_res = 0;
|
||||
bool compare_res = 0;
|
||||
std::error_code ec{};
|
||||
|
||||
//TODO: Set the appropriate error code for none
|
||||
|
@ -268,6 +268,18 @@ public:
|
|||
return {std::move(sign), ec};
|
||||
}
|
||||
|
||||
/*!
|
||||
*/
|
||||
static verify_result_t
|
||||
verify(const string_view key, const string_view head, const string_view sign)
|
||||
{
|
||||
bool compare_res = 0;
|
||||
std::error_code ec{};
|
||||
|
||||
//TODO: Set the appropriate error code for none
|
||||
return {compare_res, ec};
|
||||
}
|
||||
|
||||
private:
|
||||
/*!
|
||||
*/
|
||||
|
@ -284,5 +296,7 @@ private:
|
|||
|
||||
} // END namespace jwt
|
||||
|
||||
#include "jwt/impl/algorithm.ipp"
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue