Goby3 3.5.1
2026.06.04
Loading...
Searching...
No Matches
jwt::verify_ops::verify_context< json_traits > Struct Template Reference

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

Public Member Functions

 verify_context (date ctime, const decoded_jwt< json_traits > &j, size_t l)
 
basic_claim< json_traits > get_claim (bool in_header, std::error_code &ec) const
 Helper method to get a claim from the jwt in this context.
 
basic_claim< json_traits > get_claim (bool in_header, json::type t, std::error_code &ec) const
 
basic_claim< json_traits > get_claim (std::error_code &ec) const
 Helper method to get a payload claim from the jwt.
 
basic_claim< json_traits > get_claim (json::type t, std::error_code &ec) const
 Helper method to get a payload claim of a specific type from the jwt.
 

Public Attributes

date current_time
 Current time, retrieved from the verifiers clock and cached for performance and consistency.
 
const decoded_jwt< json_traits > & jwt
 The jwt passed to the verifier.
 
size_t default_leeway {0}
 The configured default leeway for this verification.
 
json_traits::string_type claim_key {}
 The claim key to apply this comparison on.
 

Detailed Description

template<typename json_traits>
struct jwt::verify_ops::verify_context< json_traits >

This is the base container which holds the token that need to be verified

Definition at line 3379 of file jwt.h.

Constructor & Destructor Documentation

◆ verify_context()

template<typename json_traits >
jwt::verify_ops::verify_context< json_traits >::verify_context ( date  ctime,
const decoded_jwt< json_traits > &  j,
size_t  l 
)
inline

Definition at line 3380 of file jwt.h.

Member Function Documentation

◆ get_claim() [1/4]

template<typename json_traits >
basic_claim< json_traits > jwt::verify_ops::verify_context< json_traits >::get_claim ( bool  in_header,
json::type  t,
std::error_code &  ec 
) const
inline

Helper method to get a claim of a specific type from the jwt in this context

Parameters
in_headercheck JWT header or payload sections
tthe expected type of the claim
ecstd::error_code which will indicate if any error occure
Returns
basic_claim if it was present otherwise empty

Definition at line 3420 of file jwt.h.

◆ get_claim() [2/4]

template<typename json_traits >
basic_claim< json_traits > jwt::verify_ops::verify_context< json_traits >::get_claim ( bool  in_header,
std::error_code &  ec 
) const
inline

Helper method to get a claim from the jwt in this context.

Parameters
in_headercheck JWT header or payload sections
ecstd::error_code which will indicate if any error occure
Returns
basic_claim if it was present otherwise empty

Definition at line 3398 of file jwt.h.

◆ get_claim() [3/4]

template<typename json_traits >
basic_claim< json_traits > jwt::verify_ops::verify_context< json_traits >::get_claim ( json::type  t,
std::error_code &  ec 
) const
inline

Helper method to get a payload claim of a specific type from the jwt.

Parameters
tthe expected type of the claim
ecstd::error_code which will indicate if any error occure
Returns
basic_claim if it was present otherwise empty

Definition at line 3441 of file jwt.h.

◆ get_claim() [4/4]

template<typename json_traits >
basic_claim< json_traits > jwt::verify_ops::verify_context< json_traits >::get_claim ( std::error_code &  ec) const
inline

Helper method to get a payload claim from the jwt.

Parameters
ecstd::error_code which will indicate if any error occure
Returns
basic_claim if it was present otherwise empty

Definition at line 3434 of file jwt.h.

Member Data Documentation

◆ claim_key

template<typename json_traits >
json_traits::string_type jwt::verify_ops::verify_context< json_traits >::claim_key {}

The claim key to apply this comparison on.

Definition at line 3390 of file jwt.h.

◆ current_time

template<typename json_traits >
date jwt::verify_ops::verify_context< json_traits >::current_time

Current time, retrieved from the verifiers clock and cached for performance and consistency.

Definition at line 3383 of file jwt.h.

◆ default_leeway

template<typename json_traits >
size_t jwt::verify_ops::verify_context< json_traits >::default_leeway {0}

The configured default leeway for this verification.

Definition at line 3387 of file jwt.h.

◆ jwt

template<typename json_traits >
const decoded_jwt<json_traits>& jwt::verify_ops::verify_context< json_traits >::jwt

The jwt passed to the verifier.

Definition at line 3385 of file jwt.h.


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