MySQL 9.3.0
Source Code Documentation
helper::Jwt Class Reference

#include <jwt.h>

Public Types

using Value = rapidjson::Value
 
using Document = rapidjson::Document
 

Public Member Functions

 Jwt ()
 
bool is_valid () const
 
bool verify (const std::string &secret) const
 
std::string sign (const std::string &secret) const
 
std::string get_header_claim_algorithm () const
 
std::string get_header_claim_type () const
 
std::vector< std::string > get_payload_claim_names () const
 
const Valueget_payload_claim_custom (const std::string &name) const
 
std::string get_token () const
 

Static Public Member Functions

static void parse (const std::string &token, JwtHolder *out)
 
static Jwt create (const JwtHolder &holder)
 
static Jwt create (const std::string &algoritym, Document &payload)
 

Static Private Member Functions

static std::vector< std::string > get_payload_names (const Value &v)
 

Private Attributes

bool valid_ {false}
 
JwtHolder holder_
 
Document header_
 
Document payload_
 
std::string signature_
 

Member Typedef Documentation

◆ Document

using helper::Jwt::Document = rapidjson::Document

◆ Value

using helper::Jwt::Value = rapidjson::Value

Constructor & Destructor Documentation

◆ Jwt()

helper::Jwt::Jwt ( )
inline

Member Function Documentation

◆ create() [1/2]

Jwt helper::Jwt::create ( const JwtHolder holder)
static

◆ create() [2/2]

Jwt helper::Jwt::create ( const std::string &  algoritym,
Document payload 
)
static

◆ get_header_claim_algorithm()

std::string helper::Jwt::get_header_claim_algorithm ( ) const

◆ get_header_claim_type()

std::string helper::Jwt::get_header_claim_type ( ) const

◆ get_payload_claim_custom()

const Jwt::Value * helper::Jwt::get_payload_claim_custom ( const std::string &  name) const

◆ get_payload_claim_names()

std::vector< std::string > helper::Jwt::get_payload_claim_names ( ) const

◆ get_payload_names()

std::vector< std::string > helper::Jwt::get_payload_names ( const Value v)
staticprivate

◆ get_token()

std::string helper::Jwt::get_token ( ) const
inline

◆ is_valid()

bool helper::Jwt::is_valid ( void  ) const

◆ parse()

void helper::Jwt::parse ( const std::string &  token,
JwtHolder out 
)
static

◆ sign()

std::string helper::Jwt::sign ( const std::string &  secret) const

◆ verify()

bool helper::Jwt::verify ( const std::string &  secret) const

Member Data Documentation

◆ header_

Document helper::Jwt::header_
private

◆ holder_

JwtHolder helper::Jwt::holder_
private

◆ payload_

Document helper::Jwt::payload_
private

◆ signature_

std::string helper::Jwt::signature_
private

◆ valid_

bool helper::Jwt::valid_ {false}
private

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