10Duke Enterprise C++ SDK
Toggle main menu visibility
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
11
namespace
tenduke
{
namespace
ee
{
namespace
licensing
{
namespace
impl
{
12
20
class
KeyListSignatureValidator
:
public
tenduke::jwt::JWTSignatureValidator
21
{
22
public
:
28
KeyListSignatureValidator
(
29
std::vector<std::shared_ptr<const tenduke::crypto::PublicKey>> keys,
30
::tenduke::crypto::HashAlgorithm
algorithm
31
);
32
33
// JWTSignatureValidator interface
34
public
:
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
45
private
:
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
tenduke::ee::licensing::impl::KeyListSignatureValidator::getVerificationKeys
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
tenduke::ee::licensing::impl::KeyListSignatureValidator::KeyListSignatureValidator
KeyListSignatureValidator(std::vector< std::shared_ptr< const tenduke::crypto::PublicKey > > keys, ::tenduke::crypto::HashAlgorithm algorithm)
Constructs new instance.
Definition
KeyListSignatureValidator.cpp:8
tenduke::ee::licensing::impl::KeyListSignatureValidator::validate
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
tenduke::json::JSONObject
JSON object element.
Definition
JSONObject.h:16
tenduke::jwt::JWTSignatureValidator
Service for validating the JWT-signature.
Definition
JWTSignatureValidator.h:18
tenduke::crypto::HashAlgorithm
HashAlgorithm
Currently supported hash algorithms.
Definition
HashAlgorithm.h:13
tenduke::ee::licensing::impl
Implementations of licensing related services.
Definition
DefaultLicenseTokens.h:21
tenduke::ee::licensing
Classes, functions and globals related to 10Duke Enterprise licensing.
Definition
AuthzLicensingClient.h:13
tenduke::ee
Classes, functions and globals of 10Duke Enterprise C++ Client.
Definition
APIRequest.h:4
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
client
enterprise
api
src
licensing
impl
KeyListSignatureValidator.h
Generated by
1.17.0