10Duke Scale C++ Client
|
#include <JWKS.h>
JSON Web Key Set, a container for one or more tenduke::jwk::JWK
s, indexed by the JWK key ID.
This container is thread-safe and can be used as a shared, stateful repository of keys.
Public Member Functions | |
void | addKey (const tenduke::jwk::JWK &key) |
Adds new key to the set. | |
bool | empty () |
Checks if the key set is empty. | |
std::map< std::string, tenduke::jwk::JWK > | getAllKeys () |
Returns all contained JWKs as a map. | |
tenduke::jwk::JWK | getKey (const std::string &keyId) |
Returns JWK by its id. | |
bool | hasKey (const std::string &keyId) |
Checks if the set has a key with the given id. | |
void | merge (const JWKS &other) |
Merges another JWKS to this key set. | |
void | remove (const std::string &keyId) |
Removes key by ID. | |
void tenduke::jwk::JWKS::addKey | ( | const tenduke::jwk::JWK & | key | ) |
Adds new key to the set.
NOTE: Does nothing if the key already exists.
key | - |
bool tenduke::jwk::JWKS::empty | ( | ) |
Checks if the key set is empty.
std::map< std::string, xdjwk::JWK > tenduke::jwk::JWKS::getAllKeys | ( | ) |
xdjwk::JWK tenduke::jwk::JWKS::getKey | ( | const std::string & | keyId | ) |
bool tenduke::jwk::JWKS::hasKey | ( | const std::string & | keyId | ) |
Checks if the set has a key with the given id.
keyId | - |
void tenduke::jwk::JWKS::merge | ( | const JWKS & | other | ) |
Merges another JWKS to this key set.
Merge is done by the key IDs. On conflict, old key will be replaced by key from other
set.
other | - |
void tenduke::jwk::JWKS::remove | ( | const std::string & | keyId | ) |
Removes key by ID.
keyId | - |