10Duke Scale C++ Client
|
#include <JWKParser.h>
Parses JSON Web Key (JWK) from JSON.
See https://www.rfc-editor.org/rfc/rfc7517 See https://www.rfc-editor.org/rfc/rfc7518
Public Member Functions | |
JWKParser (std::shared_ptr< const tenduke::utl::Base64Decoder > base64Decoder, std::shared_ptr< const tenduke::crypto::KeyFactory > keyFactory) | |
Constructs new instance. | |
virtual JWK | from (const json::JSONObject &key) const |
Parses single JWK from tenduke::json::JSOObject. | |
Protected Member Functions | |
virtual std::unique_ptr< const tenduke::crypto::PublicKey > | toPublicKey (const json::JSONObject &key) const |
Converts given JWKS in JSONObject to a PublicKey. | |
tenduke::jwk::JWKParser::JWKParser | ( | std::shared_ptr< const tenduke::utl::Base64Decoder > | base64Decoder, |
std::shared_ptr< const tenduke::crypto::KeyFactory > | keyFactory ) |
Constructs new instance.
base64Decoder | - |
keyFactory | - |
|
virtual |
Parses single JWK from tenduke::json::JSOObject.
This simple implementation only supports RSA keys.
key | - |
tenduke::crypto::CryptoException | if problems with the signing key |
tenduke::json::JSONParsingException | when server response is not valid JSON |
tenduke::jwks::JWKSException | when the JWKS-document is valid JWKS. |
|
protectedvirtual |
Converts given JWKS in JSONObject to a PublicKey.
This simple implementation only supports RSA keys.
key | - |
tenduke::crypto::CryptoException | if problems with the signing key |
tenduke::json::JSONParsingException | when server response is not valid JSON |
tenduke::jwks::JWKSException | when the JWKS-document is valid JWKS. |