10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
KeyListSignatureValidator.h
1#ifndef TENDUKE_EE_LICENSING_IMPL_KEYLISTSIGNATUREVALIDATOR_H
2#define TENDUKE_EE_LICENSING_IMPL_KEYLISTSIGNATUREVALIDATOR_H
3
4#include "crypto/asymmetric/PublicKey.h"
5#include "crypto/msgauthn/HashAlgorithm.h"
6#include "jwt/JWTSignatureValidator.h"
7
8#include <memory>
9#include <vector>
10
11namespace tenduke { namespace ee { namespace licensing { namespace impl {
12
21{
22public:
29 std::vector<std::shared_ptr<const tenduke::crypto::PublicKey>> keys,
31 );
32
33// JWTSignatureValidator interface
34public:
35 bool validate(
36 const tenduke::json::JSONObject *jwtHeader,
37 const char * payload,
38 std::size_t payloadLength,
39 const unsigned char * signatureBytes,
40 std::size_t signatureLengthB
41 ) const override;
42
43 std::vector<std::shared_ptr<const tenduke::crypto::PublicKey>> getVerificationKeys() const override;
44
45private:
46 const std::vector<std::shared_ptr<const tenduke::crypto::PublicKey>> keys;
47 const ::tenduke::crypto::HashAlgorithm algorithm;
48};
49
50}}}}
51
52#endif //TENDUKE_EE_LICENSING_IMPL_KEYLISTSIGNATUREVALIDATOR_H
std::vector< std::shared_ptr< const tenduke::crypto::PublicKey > > getVerificationKeys() const override
Returns the public keys, which the validator currently trusts for verifying signatures.
Definition KeyListSignatureValidator.cpp:31
KeyListSignatureValidator(std::vector< std::shared_ptr< const tenduke::crypto::PublicKey > > keys, ::tenduke::crypto::HashAlgorithm algorithm)
Constructs new instance.
Definition KeyListSignatureValidator.cpp:8
bool validate(const tenduke::json::JSONObject *jwtHeader, const char *payload, std::size_t payloadLength, const unsigned char *signatureBytes, std::size_t signatureLengthB) const override
Validates JWT signature.
Definition KeyListSignatureValidator.cpp:15
JSON object element.
Definition JSONObject.h:16
Service for validating the JWT-signature.
Definition JWTSignatureValidator.h:18
HashAlgorithm
Currently supported hash algorithms.
Definition HashAlgorithm.h:13
Implementations of licensing related services.
Definition DefaultLicenseTokens.h:21
Classes, functions and globals related to 10Duke Enterprise licensing.
Definition AuthzLicensingClient.h:13
Classes, functions and globals of 10Duke Enterprise C++ Client.
Definition APIRequest.h:4
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4