Goby3  3.1.5a
2024.05.23
jwt::jwks< json_traits > Class Template Reference

JWK Set. More...

#include <goby/util/thirdparty/jwt-cpp/jwt.h>

Public Types

using jwk_t = jwk< json_traits >
 
using jwt_vector_t = std::vector< jwk_t >
 
using iterator = typename jwt_vector_t::iterator
 
using const_iterator = typename jwt_vector_t::const_iterator
 

Public Member Functions

JWT_CLAIM_EXPLICIT jwks (const typename json_traits::string_type &str)
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
bool has_jwk (const typename json_traits::string_type &key_id) const noexcept
 
jwk_t get_jwk (const typename json_traits::string_type &key_id) const
 

Detailed Description

template<typename json_traits>
class jwt::jwks< json_traits >

JWK Set.

https://tools.ietf.org/html/rfc7517

A JSON object that represents a set of JWKs. The JSON object MUST have a "keys" member, which is an array of JWKs.

This container takes a JWKs and simplifies it to a vector of JWKs

Definition at line 4068 of file jwt.h.

Member Typedef Documentation

◆ const_iterator

template<typename json_traits >
using jwt::jwks< json_traits >::const_iterator = typename jwt_vector_t::const_iterator

Definition at line 4074 of file jwt.h.

◆ iterator

template<typename json_traits >
using jwt::jwks< json_traits >::iterator = typename jwt_vector_t::iterator

Definition at line 4073 of file jwt.h.

◆ jwk_t

template<typename json_traits >
using jwt::jwks< json_traits >::jwk_t = jwk<json_traits>

Definition at line 4071 of file jwt.h.

◆ jwt_vector_t

template<typename json_traits >
using jwt::jwks< json_traits >::jwt_vector_t = std::vector<jwk_t>

Definition at line 4072 of file jwt.h.

Constructor & Destructor Documentation

◆ jwks()

template<typename json_traits >
JWT_CLAIM_EXPLICIT jwt::jwks< json_traits >::jwks ( const typename json_traits::string_type &  str)
inline

Definition at line 4076 of file jwt.h.

Member Function Documentation

◆ begin() [1/2]

template<typename json_traits >
iterator jwt::jwks< json_traits >::begin ( )
inline

Definition at line 4091 of file jwt.h.

◆ begin() [2/2]

template<typename json_traits >
const_iterator jwt::jwks< json_traits >::begin ( ) const
inline

Definition at line 4095 of file jwt.h.

◆ cbegin()

template<typename json_traits >
const_iterator jwt::jwks< json_traits >::cbegin ( ) const
inline

Definition at line 4093 of file jwt.h.

◆ cend()

template<typename json_traits >
const_iterator jwt::jwks< json_traits >::cend ( ) const
inline

Definition at line 4094 of file jwt.h.

◆ end() [1/2]

template<typename json_traits >
iterator jwt::jwks< json_traits >::end ( )
inline

Definition at line 4092 of file jwt.h.

◆ end() [2/2]

template<typename json_traits >
const_iterator jwt::jwks< json_traits >::end ( ) const
inline

Definition at line 4096 of file jwt.h.

◆ get_jwk()

template<typename json_traits >
jwk_t jwt::jwks< json_traits >::get_jwk ( const typename json_traits::string_type &  key_id) const
inline

Get jwk

Returns
Requested jwk by key_id
Exceptions
std::runtime_errorIf jwk was not present

Definition at line 4112 of file jwt.h.

◆ has_jwk()

template<typename json_traits >
bool jwt::jwks< json_traits >::has_jwk ( const typename json_traits::string_type &  key_id) const
inlinenoexcept

Check if a jwk with the kid is present

Returns
true if jwk was present, false otherwise

Definition at line 4102 of file jwt.h.


The documentation for this class was generated from the following file: