10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::jwt::JWTSignatureValidator Class Referenceabstract

#include <JWTSignatureValidator.h>

Detailed Description

Service for validating the JWT-signature.

Inheritance diagram for tenduke::jwt::JWTSignatureValidator:
tenduke::jwk::JWKSSignatureValidator tenduke::jwt::FixedKeyJWTSignatureValidator tenduke::test::mocks::JWTSignatureValidatorMock tenduke::jwk::DynamicJWKSSignatureValidator tenduke::test::unittests::FakeDynamicJWKSSignatureValidator

Public Member Functions

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.
 

Member Function Documentation

◆ validate()

virtual bool tenduke::jwt::JWTSignatureValidator::validate ( const tenduke::json::JSONObject jwtHeader,
const char *  payload,
std::size_t  payloadLength,
const unsigned char *  signatureBytes,
std::size_t  signatureLengthB 
) const
pure virtual

Validates JWT signature.

Parameters
jwtHeaderJWT-header, can be e.g. used to determine the key and digestAlgorithm used
payloadJWT-payload to verify
payloadLengthlength of the payload
signatureBytesthe signature
signatureLengthBthe signature length
Returns
true if the signature is valid, false if not
Exceptions
tenduke::crypto::CryptoExceptionif there are are cryptographic issues

Implemented in tenduke::jwt::FixedKeyJWTSignatureValidator, and tenduke::jwk::JWKSSignatureValidator.


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