10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
JWKParser.h
1#ifndef TENDUKE_JWK_JWKPARSER_H
2#define TENDUKE_JWK_JWKPARSER_H
3
4#include "./JWK.h"
5#include "../crypto/asymmetric/PublicKey.h"
6#include "../crypto/asymmetric/PublicKeyFactory.h"
7#include "json/JSONObject.h"
8#include "utl/Base64Decoder.h"
9
10#include <vector>
11#include <memory>
12#include <string>
13
14namespace tenduke { namespace jwk {
15
23{
24public:
31 std::shared_ptr<const tenduke::utl::Base64Decoder> base64Decoder,
32 std::shared_ptr<const tenduke::crypto::PublicKeyFactory> keyFactory
33 );
34 virtual ~JWKParser() = default;
35
46 virtual JWK from(const json::JSONObject &key) const;
47
48protected:
58 virtual std::unique_ptr<const tenduke::crypto::PublicKey> toPublicKey(const json::JSONObject &key) const;
59
60private:
61 std::shared_ptr<const tenduke::utl::Base64Decoder> base64;
62 std::shared_ptr<const tenduke::crypto::PublicKeyFactory> createKey;
63};
64
65}}
66
67#endif // TENDUKE_JWK_JWKPARSER_H
JWKParser(std::shared_ptr< const tenduke::utl::Base64Decoder > base64Decoder, std::shared_ptr< const tenduke::crypto::PublicKeyFactory > keyFactory)
Constructs new instance.
Definition JWKParser.cpp:18
JWKParser(std::shared_ptr< const tenduke::utl::Base64Decoder > base64Decoder, std::shared_ptr< const tenduke::crypto::PublicKeyFactory > keyFactory)
Constructs new instance.
Definition JWKParser.cpp:18
virtual std::unique_ptr< const tenduke::crypto::PublicKey > toPublicKey(const json::JSONObject &key) const
Converts given JWKS in JSONObject to a PublicKey.
Definition JWKParser.cpp:47
virtual JWK from(const json::JSONObject &key) const
Parses single JWK from tenduke::json::JSOObject.
Definition JWKParser.cpp:26
Support for JSON Web Keys.
Definition DynamicJWKSSignatureValidator.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4