10Duke Scale C++ Client
All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
tenduke::jwk::JWK Class Reference

#include <JWK.h>

Detailed Description

Describes a JWK, Json Web Key.

IMPLEMENTATION NOTE: This currently only supports tenduke::crypto:PublicKey's. IMPLEMENTATION NOTE: Only subset of attributes / key types are supported.

Public Member Functions

 JWK (std::string id, std::string type, const std::shared_ptr< const tenduke::crypto::PublicKey > &key)
 Constructs new instance.
 

Static Public Member Functions

static tenduke::crypto::MessageDigest::Algorithm mapFromJWTAlgorithm (const std::string &jwtAlgorithm)
 Maps JSON Web Token algorithm (alg) to Algorithm.
 

Public Attributes

const std::string id
 Id of the key, JWK property "kid".
 
const std::string type
 Type of the key, JWK property "kty".
 
const std::shared_ptr< const tenduke::crypto::PublicKeykey
 Parsed key representation.
 

Constructor & Destructor Documentation

◆ JWK()

tenduke::jwk::JWK::JWK ( std::string id,
std::string type,
const std::shared_ptr< const tenduke::crypto::PublicKey > & key )

Constructs new instance.

Parameters
idid of the JWK (kid property)
typetype of the JWK (kty property, but this is not enough to describe all keys)
keythe actual crypto graphic key

Member Function Documentation

◆ mapFromJWTAlgorithm()

xdcrypto::MessageDigest::Algorithm tenduke::jwk::JWK::mapFromJWTAlgorithm ( const std::string & jwtAlgorithm)
static

Maps JSON Web Token algorithm (alg) to Algorithm.

TODO: Is this in correct place?

Parameters
jwtAlgorithm-
Returns
-

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