33#include <sptk5/cutils>
34#include <sptk5/xdoc/Document.h>
79 return grants.root()->findOrCreate(name)->getValue();
91 grants.root()->set(name, data);
98 Algorithm get_alg()
const;
146 void exportTo(std::ostream& output,
bool pretty)
const;
231 static xdoc::SNode find_grant(
const xdoc::SNode& node,
const String& key);
238void jwt_base64uri_encode(
Buffer& buffer);
245void jwt_b64_decode(
Buffer& destination,
const char* src);
static String get_js_string(const xdoc::SNode &node, const String &key, bool *found=nullptr)
void decode(const char *token, const String &_key="")
void exportTo(std::ostream &output, bool pretty) const
static const char * alg_str(Algorithm _alg)
void sign_sha_pem(Buffer &out, const char *str) const
void write_body(std::ostream &output, bool pretty) const
void set(const String &name, const Variant &data) const
Definition: JWT.h:89
static Algorithm str_alg(const char *alg)
void encode(std::ostream &out) const
void verify_sha_hmac(const char *head, const char *sig) const
void verify(const Buffer &head, const Buffer &sig) const
xdoc::Document grants
Token content.
Definition: JWT.h:63
static bool get_js_bool(const xdoc::SNode &node, const String &key, bool *found=nullptr)
const Variant & get(const String &name) const
Definition: JWT.h:77
void verify_sha_pem(const char *head, const char *sig_b64) const
void write_head(std::ostream &output, bool pretty) const
void set_alg(Algorithm _alg, const String &_key)
Algorithm
Definition: JWT.h:47
String key
Signature encryption key.
Definition: JWT.h:62
void sign(Buffer &token, const char *str) const
static long get_js_int(const xdoc::SNode &node, const String &key, bool *found=nullptr)
void sign_sha_hmac(Buffer &out, const char *str) const
Definition: Variant.h:372
Definition: Document.h:34