JSON Web Key.
More...
#include <goby/util/thirdparty/jwt-cpp/jwt.h>
template<typename json_traits>
class jwt::jwk< json_traits >
JSON Web Key.
https://tools.ietf.org/html/rfc7517
A JSON object that represents a cryptographic key. The members of the object represent properties of the key, including its value.
Definition at line 3844 of file jwt.h.
◆ jwk() [1/2]
template<typename json_traits >
◆ jwk() [2/2]
template<typename json_traits >
◆ empty()
template<typename json_traits >
◆ get_algorithm()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_algorithm |
( |
| ) |
const |
|
inline |
Get algorithm claim
- Returns
- algorithm as string
- Exceptions
-
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) |
Definition at line 3898 of file jwt.h.
◆ get_curve()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_curve |
( |
| ) |
const |
|
inline |
◆ get_jwk_claim()
template<typename json_traits >
basic_claim_t jwt::jwk< json_traits >::get_jwk_claim |
( |
const typename json_traits::string_type & |
name | ) |
const |
|
inline |
Get jwks claim
- Returns
- Requested claim
- Exceptions
-
std::runtime_error | If claim was not present |
Definition at line 4050 of file jwt.h.
◆ get_key_id()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_key_id |
( |
| ) |
const |
|
inline |
Get key id claim
- Returns
- key id as string
- Exceptions
-
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) |
Definition at line 3909 of file jwt.h.
◆ get_key_operations()
template<typename json_traits >
Get key operation types claim
- Returns
- key operation types as a set of strings
- Exceptions
-
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) |
Definition at line 3887 of file jwt.h.
◆ get_key_type()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_key_type |
( |
| ) |
const |
|
inline |
Get key type claim
This returns the general type (e.g. RSA or EC), not a specific algorithm value.
- Returns
- key type as string
- Exceptions
-
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) |
Definition at line 3868 of file jwt.h.
◆ get_use()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_use |
( |
| ) |
const |
|
inline |
Get public key usage claim
- Returns
- usage parameter as string
- Exceptions
-
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) |
Definition at line 3879 of file jwt.h.
◆ get_x5c()
template<typename json_traits >
json_traits::array_type jwt::jwk< json_traits >::get_x5c |
( |
| ) |
const |
|
inline |
Get x5c claim
- Returns
- x5c as an array
- Exceptions
-
std::runtime_error | If claim was not present |
std::bad_cast | Claim was present but not a array (Should not happen in a valid token) |
Definition at line 3932 of file jwt.h.
◆ get_x5c_key_value()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_x5c_key_value |
( |
| ) |
const |
|
inline |
Get x5c claim as a string
- Returns
- x5c as an string
- Exceptions
-
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) |
Definition at line 3967 of file jwt.h.
◆ get_x5t()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_x5t |
( |
| ) |
const |
|
inline |
Get X509 thumbprint claim
- Returns
- x5t as string
- Exceptions
-
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) |
Definition at line 3948 of file jwt.h.
◆ get_x5t_sha256()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_x5t_sha256 |
( |
| ) |
const |
|
inline |
Get X509 SHA256 thumbprint claim
- Returns
- x5t::S256 as string
- Exceptions
-
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) |
Definition at line 3956 of file jwt.h.
◆ get_x5u()
template<typename json_traits >
json_traits::string_type jwt::jwk< json_traits >::get_x5u |
( |
| ) |
const |
|
inline |
Get X509 URL claim
- Returns
- x5u as string
- Exceptions
-
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) |
Definition at line 3940 of file jwt.h.
◆ has_algorithm()
template<typename json_traits >
Check if algortihm is present ("alg")
- Returns
- true if present, false otherwise
Definition at line 3998 of file jwt.h.
◆ has_curve()
template<typename json_traits >
Check if curve is present ("crv")
- Returns
- true if present, false otherwise
Definition at line 4004 of file jwt.h.
◆ has_jwk_claim()
template<typename json_traits >
bool jwt::jwk< json_traits >::has_jwk_claim |
( |
const typename json_traits::string_type & |
name | ) |
const |
|
inlinenoexcept |
Check if a jwks claim is present
- Returns
- true if claim was present, false otherwise
Definition at line 4040 of file jwt.h.
◆ has_key_id()
template<typename json_traits >
Check if key id is present ("kid")
- Returns
- true if present, false otherwise
Definition at line 4010 of file jwt.h.
◆ has_key_operations()
template<typename json_traits >
Check if a key operations parameter is present ("key_ops")
- Returns
- true if present, false otherwise
Definition at line 3992 of file jwt.h.
◆ has_key_type()
template<typename json_traits >
Check if a key type is present ("kty")
- Returns
- true if present, false otherwise
Definition at line 3980 of file jwt.h.
◆ has_use()
template<typename json_traits >
Check if a public key usage indication is present ("use")
- Returns
- true if present, false otherwise
Definition at line 3986 of file jwt.h.
◆ has_x5c()
template<typename json_traits >
Check if X509 Chain is present ("x5c")
- Returns
- true if present, false otherwise
Definition at line 4022 of file jwt.h.
◆ has_x5t()
template<typename json_traits >
Check if a X509 thumbprint is present ("x5t")
- Returns
- true if present, false otherwise
Definition at line 4028 of file jwt.h.
◆ has_x5t_sha256()
template<typename json_traits >
Check if a X509 SHA256 thumbprint is present ("x5t#S256")
- Returns
- true if present, false otherwise
Definition at line 4034 of file jwt.h.
◆ has_x5u()
template<typename json_traits >
Check if X509 URL is present ("x5u")
- Returns
- true if present, false otherwise
Definition at line 4016 of file jwt.h.
The documentation for this class was generated from the following file:
- goby/util/thirdparty/jwt-cpp/jwt.h