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

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

Public Types

using basic_claim_t = basic_claim< json_traits >
 
using iterator = typename json_traits::object_type::iterator
 
using const_iterator = typename json_traits::object_type::const_iterator
 

Public Member Functions

 map_of_claims ()=default
 
 map_of_claims (const map_of_claims &)=default
 
 map_of_claims (map_of_claims &&)=default
 
map_of_claimsoperator= (const map_of_claims &)=default
 
map_of_claimsoperator= (map_of_claims &&)=default
 
 map_of_claims (typename json_traits::object_type json)
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
bool has_claim (const typename json_traits::string_type &name) const noexcept
 
basic_claim_t get_claim (const typename json_traits::string_type &name) const
 
std::unordered_map< typename json_traits::string_type, basic_claim_tget_claims () const
 

Static Public Member Functions

static json_traits::object_type parse_claims (const typename json_traits::string_type &str)
 Parse a JSON string into a map of claims. More...
 

Detailed Description

template<typename json_traits>
class jwt::details::map_of_claims< json_traits >

Definition at line 2622 of file jwt.h.

Member Typedef Documentation

◆ basic_claim_t

template<typename json_traits >
using jwt::details::map_of_claims< json_traits >::basic_claim_t = basic_claim<json_traits>

Definition at line 2627 of file jwt.h.

◆ const_iterator

template<typename json_traits >
using jwt::details::map_of_claims< json_traits >::const_iterator = typename json_traits::object_type::const_iterator

Definition at line 2629 of file jwt.h.

◆ iterator

template<typename json_traits >
using jwt::details::map_of_claims< json_traits >::iterator = typename json_traits::object_type::iterator

Definition at line 2628 of file jwt.h.

Constructor & Destructor Documentation

◆ map_of_claims() [1/4]

template<typename json_traits >
jwt::details::map_of_claims< json_traits >::map_of_claims ( )
default

◆ map_of_claims() [2/4]

template<typename json_traits >
jwt::details::map_of_claims< json_traits >::map_of_claims ( const map_of_claims< json_traits > &  )
default

◆ map_of_claims() [3/4]

template<typename json_traits >
jwt::details::map_of_claims< json_traits >::map_of_claims ( map_of_claims< json_traits > &&  )
default

◆ map_of_claims() [4/4]

template<typename json_traits >
jwt::details::map_of_claims< json_traits >::map_of_claims ( typename json_traits::object_type  json)
inline

Definition at line 2637 of file jwt.h.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 2639 of file jwt.h.

◆ begin() [2/2]

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

Definition at line 2643 of file jwt.h.

◆ cbegin()

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

Definition at line 2641 of file jwt.h.

◆ cend()

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

Definition at line 2642 of file jwt.h.

◆ end() [1/2]

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

Definition at line 2640 of file jwt.h.

◆ end() [2/2]

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

Definition at line 2644 of file jwt.h.

◆ get_claim()

template<typename json_traits >
basic_claim_t jwt::details::map_of_claims< json_traits >::get_claim ( const typename json_traits::string_type &  name) const
inline

Get a claim by name

Parameters
namethe name of the desired claim
Returns
Requested claim
Exceptions
jwt::error::claim_not_present_exceptionif the claim was not present

Definition at line 2680 of file jwt.h.

◆ get_claims()

template<typename json_traits >
std::unordered_map<typename json_traits::string_type, basic_claim_t> jwt::details::map_of_claims< json_traits >::get_claims ( ) const
inline

Definition at line 2687 of file jwt.h.

◆ has_claim()

template<typename json_traits >
bool jwt::details::map_of_claims< json_traits >::has_claim ( const typename json_traits::string_type &  name) const
inlinenoexcept

Check if a claim is present in the map

Returns
true if claim was present, false otherwise

Definition at line 2668 of file jwt.h.

◆ operator=() [1/2]

template<typename json_traits >
map_of_claims& jwt::details::map_of_claims< json_traits >::operator= ( const map_of_claims< json_traits > &  )
default

◆ operator=() [2/2]

template<typename json_traits >
map_of_claims& jwt::details::map_of_claims< json_traits >::operator= ( map_of_claims< json_traits > &&  )
default

◆ parse_claims()

template<typename json_traits >
static json_traits::object_type jwt::details::map_of_claims< json_traits >::parse_claims ( const typename json_traits::string_type &  str)
inlinestatic

Parse a JSON string into a map of claims.

The implication is that a "map of claims" is identic to a JSON object

Parameters
strJSON data to be parse as an object
Returns
content as JSON object

Definition at line 2655 of file jwt.h.


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