JWT-CPP v0.7.0
A header only library for creating and validating JSON Web Tokens (JWT) in C++
Loading...
Searching...
No Matches
jwt::error Namespace Reference

Everything related to error codes issued by the library. More...

Classes

struct  claim_not_present_exception
 
struct  ecdsa_exception
 
struct  invalid_json_exception
 
struct  rsa_exception
 
struct  signature_generation_exception
 
struct  signature_verification_exception
 
struct  token_verification_exception
 

Enumerations

enum class  rsa_error {
  ok = 0 , cert_load_failed = 10 , get_key_failed , write_key_failed ,
  write_cert_failed , convert_to_pem_failed , load_key_bio_write , load_key_bio_read ,
  create_mem_bio_failed , no_key_provided , set_rsa_failed , create_context_failed
}
 Errors related to processing of RSA signatures.
 
enum class  ecdsa_error {
  ok = 0 , load_key_bio_write = 10 , load_key_bio_read , create_mem_bio_failed ,
  no_key_provided , invalid_key_size , invalid_key , create_context_failed ,
  cert_load_failed , get_key_failed , write_key_failed , write_cert_failed ,
  convert_to_pem_failed , unknown_curve , set_ecdsa_failed
}
 Errors related to processing of RSA signatures.
 
enum class  signature_verification_error {
  ok = 0 , invalid_signature = 10 , create_context_failed , verifyinit_failed ,
  verifyupdate_failed , verifyfinal_failed , get_key_failed , set_rsa_pss_saltlen_failed ,
  signature_encoding_failed
}
 Errors related to verification of signatures.
 
enum class  signature_generation_error {
  ok = 0 , hmac_failed = 10 , create_context_failed , signinit_failed ,
  signupdate_failed , signfinal_failed , ecdsa_do_sign_failed , digestinit_failed ,
  digestupdate_failed , digestfinal_failed , rsa_padding_failed , rsa_private_encrypt_failed ,
  get_key_failed , set_rsa_pss_saltlen_failed , signature_decoding_failed
}
 Errors related to signature generation errors.
 
enum class  token_verification_error {
  ok = 0 , wrong_algorithm = 10 , missing_claim , claim_type_missmatch ,
  claim_value_missmatch , token_expired , audience_missmatch
}
 Errors related to token verification errors.
 

Functions

std::error_category & rsa_error_category ()
 Error category for RSA errors.
 
std::error_code make_error_code (rsa_error e)
 Converts JWT-CPP errors into generic STL error_codes.
 
std::error_category & ecdsa_error_category ()
 Error category for ECDSA errors.
 
std::error_code make_error_code (ecdsa_error e)
 Converts JWT-CPP errors into generic STL error_codes.
 
std::error_category & signature_verification_error_category ()
 Error category for verification errors.
 
std::error_code make_error_code (signature_verification_error e)
 Converts JWT-CPP errors into generic STL error_codes.
 
std::error_category & signature_generation_error_category ()
 Error category for signature generation errors.
 
std::error_code make_error_code (signature_generation_error e)
 Converts JWT-CPP errors into generic STL error_codes.
 
std::error_category & token_verification_error_category ()
 Error category for token verification errors.
 
std::error_code make_error_code (token_verification_error e)
 Converts JWT-CPP errors into generic STL error_codes.
 
void throw_if_error (std::error_code ec)
 Raises an exception if any JWT-CPP error codes are active.
 

Detailed Description

Everything related to error codes issued by the library.