mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 01:08:31 +00:00
Put verify under different function. Added new error codes for verification failures.
This commit is contained in:
parent
912e4b5ff9
commit
7a511c46fe
7 changed files with 204 additions and 30 deletions
|
@ -2,6 +2,7 @@
|
|||
#define CPP_JWT_PARAMETERS_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
|
@ -143,6 +144,34 @@ struct leeway_param
|
|||
uint32_t leeway_;
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
struct audience_param
|
||||
{
|
||||
audience_param(std::string aud)
|
||||
: aud_(std::move(aud))
|
||||
{}
|
||||
|
||||
const std::string& get() const& noexcept { return aud_; }
|
||||
std::string get() && noexcept { return aud_; }
|
||||
|
||||
std::string aud_;
|
||||
};
|
||||
|
||||
/**
|
||||
*/
|
||||
struct issuer_param
|
||||
{
|
||||
issuer_param(std::string iss)
|
||||
: iss_(std::move(iss))
|
||||
{}
|
||||
|
||||
const std::string& get() const& noexcept { return iss_; }
|
||||
std::string get() && noexcept { return iss_; }
|
||||
|
||||
std::string iss_;
|
||||
};
|
||||
|
||||
} // END namespace detail
|
||||
|
||||
// Useful typedef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue