qb
2.0.0.0
C++17 Actor Framework
|
JWT verification options. More...
#include <crypto_jwt.h>
Public Attributes | |
Algorithm | algorithm |
The algorithm expected for the token signature. | |
std::string | key |
Secret key for HMAC algorithms, or PEM-encoded public key for asymmetric algorithms. | |
bool | verify_expiration |
Whether to validate the exp (expiration time) claim. | |
bool | verify_not_before |
Whether to validate the nbf (not before) claim. | |
bool | verify_issuer |
Whether to validate the iss (issuer) claim. | |
std::optional< std::string > | issuer |
Expected issuer if verify_issuer is true. | |
bool | verify_audience |
Whether to validate the aud (audience) claim. | |
std::optional< std::string > | audience |
Expected audience if verify_audience is true. | |
bool | verify_subject |
Whether to validate the sub (subject) claim. | |
std::optional< std::string > | subject |
Expected subject if verify_subject is true. | |
bool | verify_jti |
Whether to validate the jti (JWT ID) claim. | |
std::optional< std::string > | jti |
Expected JWT ID if verify_jti is true. | |
std::chrono::seconds | clock_skew |
Clock skew tolerance for exp and nbf validations. | |
std::map< std::string, std::string > | required_claims |
Additional custom claims that must be present in the payload and match the provided values. |
JWT verification options.
bool qb::jwt::VerifyOptions::verify_expiration |
Whether to validate the exp (expiration time) claim.
Default true.
bool qb::jwt::VerifyOptions::verify_not_before |
Whether to validate the nbf (not before) claim.
Default true.
bool qb::jwt::VerifyOptions::verify_issuer |
Whether to validate the iss (issuer) claim.
Default false.
bool qb::jwt::VerifyOptions::verify_audience |
Whether to validate the aud (audience) claim.
Default false.
std::optional<std::string> qb::jwt::VerifyOptions::audience |
Expected audience if verify_audience is true.
Can be a single string or a JSON array of strings.
bool qb::jwt::VerifyOptions::verify_subject |
Whether to validate the sub (subject) claim.
Default false.
bool qb::jwt::VerifyOptions::verify_jti |
Whether to validate the jti (JWT ID) claim.
Default false.
std::chrono::seconds qb::jwt::VerifyOptions::clock_skew |
Clock skew tolerance for exp and nbf validations.
Default 0 seconds.