10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::jwk::JWKParser Class Reference

#include <JWKParser.h>

Detailed Description

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::PublicKeytoPublicKey (const json::JSONObject &key) const
 Converts given JWKS in JSONObject to a PublicKey.
 

Constructor & Destructor Documentation

◆ JWKParser()

tenduke::jwk::JWKParser::JWKParser ( std::shared_ptr< const tenduke::utl::Base64Decoder base64Decoder,
std::shared_ptr< const tenduke::crypto::KeyFactory keyFactory 
)

Constructs new instance.

Parameters
base64Decoder-
keyFactory-

Member Function Documentation

◆ from()

xdjwk::JWK tenduke::jwk::JWKParser::from ( const json::JSONObject key) const
virtual

Parses single JWK from tenduke::json::JSOObject.

This simple implementation only supports RSA keys.

Parameters
key-
Returns
-
Exceptions
tenduke::crypto::CryptoExceptionif problems with the signing key
tenduke::json::JSONParsingExceptionwhen server response is not valid JSON
tenduke::jwks::JWKSExceptionwhen the JWKS-document is valid JWKS.

◆ toPublicKey()

std::unique_ptr< const xdcrypto::PublicKey > tenduke::jwk::JWKParser::toPublicKey ( const json::JSONObject key) const
protectedvirtual

Converts given JWKS in JSONObject to a PublicKey.

This simple implementation only supports RSA keys.

Parameters
key-
Returns
-
Exceptions
tenduke::crypto::CryptoExceptionif problems with the signing key
tenduke::json::JSONParsingExceptionwhen server response is not valid JSON
tenduke::jwks::JWKSExceptionwhen the JWKS-document is valid JWKS.

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