mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-15 09:18:33 +00:00
Exception and non exception based decoding
This commit is contained in:
parent
7a511c46fe
commit
c484ced63d
4 changed files with 53 additions and 6 deletions
|
@ -43,6 +43,8 @@ struct DecodeErrorCategory: std::error_category
|
|||
{
|
||||
switch (static_cast<DecodeErrc>(ev))
|
||||
{
|
||||
case DecodeErrc::EmptyAlgoList:
|
||||
return "empty algorithm list";
|
||||
case DecodeErrc::AlgHeaderMiss:
|
||||
return "missing algorithm header";
|
||||
case DecodeErrc::TypHeaderMiss:
|
||||
|
@ -82,6 +84,8 @@ struct VerificationErrorCategory: std::error_category
|
|||
return "invalid audience";
|
||||
case VerificationErrc::ImmatureSignature:
|
||||
return "immature signature";
|
||||
case VerificationErrc::InvalidSignature:
|
||||
return "invalid signature";
|
||||
};
|
||||
|
||||
assert (0 && "Code not reached");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue