10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
FixedKeyJWTSignatureValidator Class Reference

#include <FixedKeyJWTSignatureValidator.h>

Detailed Description

A tenduke::jwt::JWTSignatureValidator, which expects that the signature digestAlgorithm and verification key are pre-configured.

Only asymmetric algorithms are supported.

Inheritance diagram for FixedKeyJWTSignatureValidator:
tenduke::jwt::JWTSignatureValidator

Public Member Functions

 FixedKeyJWTSignatureValidator (const std::shared_ptr< const ::tenduke::crypto::PublicKey > &validationKey, ::tenduke::crypto::HashAlgorithm algorithm)
 Constructs a new instance.
bool validate (const json::JSONObject *jwtHeader, const char *payload, std::size_t payloadLength, const unsigned char *signatureBytes, std::size_t signatureLengthB) const override
std::vector< std::shared_ptr< const tenduke::crypto::PublicKey > > getVerificationKeys () const override
 Returns the fixed validation key.
Public Member Functions inherited from tenduke::jwt::JWTSignatureValidator
virtual bool validate (const tenduke::json::JSONObject *jwtHeader, const char *payload, std::size_t payloadLength, const unsigned char *signatureBytes, std::size_t signatureLengthB) const =0
 Validates JWT signature.

Constructor & Destructor Documentation

◆ FixedKeyJWTSignatureValidator()

Constructs a new instance.

Parameters
validationKeythe key for verifying the signatures. Must not be null.
algorithm-
Exceptions
std::invalid_argumentif validationKey is null

Member Function Documentation

◆ getVerificationKeys()

std::vector< std::shared_ptr< const::PublicKey > > tenduke::jwt::FixedKeyJWTSignatureValidator::getVerificationKeys ( ) const
overridevirtual

Returns the fixed validation key.

Returns
-

Reimplemented from tenduke::jwt::JWTSignatureValidator.


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