JWT-CPP v0.7.0
A header only library for creating and validating JSON Web Tokens (JWT) in C++
|
#include <jwt.h>
Public Types | |
using | basic_claim_t = basic_claim<json_traits> |
Public Member Functions | |
bool | has_algorithm () const noexcept |
bool | has_type () const noexcept |
bool | has_content_type () const noexcept |
bool | has_key_id () const noexcept |
json_traits::string_type | get_algorithm () const |
json_traits::string_type | get_type () const |
json_traits::string_type | get_content_type () const |
json_traits::string_type | get_key_id () const |
bool | has_header_claim (const typename json_traits::string_type &name) const noexcept |
basic_claim_t | get_header_claim (const typename json_traits::string_type &name) const |
Protected Attributes | |
details::map_of_claims< json_traits > | header_claims |
Base class that represents a token header. Contains Convenience accessors for common claims.
|
inline |
Get algorithm claim
std::runtime_error | If claim was not present |
std::bad_cast | Claim was present but not a string (Should not happen in a valid token) |
|
inline |
Get content type claim
std::runtime_error | If claim was not present |
std::bad_cast | Claim was present but not a string (Should not happen in a valid token) |
|
inline |
Get header claim
std::runtime_error | If claim was not present |
|
inline |
Get key id claim
std::runtime_error | If claim was not present |
std::bad_cast | Claim was present but not a string (Should not happen in a valid token) |
|
inline |
Get type claim
std::runtime_error | If claim was not present |
std::bad_cast | Claim was present but not a string (Should not happen in a valid token) |
|
inlinenoexcept |
Check if algorithm is present ("alg")
|
inlinenoexcept |
Check if content type is present ("cty")
|
inlinenoexcept |
Check if a header claim is present
|
inlinenoexcept |
Check if key id is present ("kid")
|
inlinenoexcept |
Check if type is present ("typ")