10Duke Scale C++ Client
Loading...
Searching...
No Matches
DefaultJWTParserFactory.h
1#ifndef TENDUKE_JWT_DEFAULTJWTPARSERFACTORY_H
2#define TENDUKE_JWT_DEFAULTJWTPARSERFACTORY_H
3
4#include "./JWTParserFactory.h"
5
6#include "json/JSONParser.h"
7#include "utl/Base64Decoder.h"
8
9namespace tenduke { namespace jwt {
10
15
16public:
23 const std::shared_ptr<const tenduke::utl::Base64Decoder> &base64Decoder,
24 const std::shared_ptr<const tenduke::json::JSONParser> &jsonParser
25 );
26
27 // tenduke::jwt::JWTParserFactory implementation
28public:
29 std::unique_ptr<const tenduke::jwt::JWTParser> create() const override;
30 std::unique_ptr<const tenduke::jwt::JWTParser> create(
31 const std::shared_ptr<const tenduke::crypto::PublicKey> &publicKey,
33 ) const override;
34 std::unique_ptr<const tenduke::jwt::JWTParser> create(const std::shared_ptr<tenduke::jwt::JWTSignatureValidator> &signatureValidator) const override;
35
36private:
37 std::shared_ptr<const tenduke::utl::Base64Decoder> base64Decoder;
38 std::shared_ptr<const tenduke::json::JSONParser> jsonParser;
39};
40
41}}
42
43#endif //TENDUKE_JWT_DEFAULTJWTPARSERFACTORY_H
Algorithm
Supported algorithms.
Definition MessageDigest.h:24
Default implementation of tenduke::jwt::JWTParserFactory.
Definition DefaultJWTParserFactory.h:14
std::unique_ptr< const tenduke::jwt::JWTParser > create(const std::shared_ptr< tenduke::jwt::JWTSignatureValidator > &signatureValidator) const override
Creates a tenduke::jwt::JWTParser, which validates the signature with given validator.
std::unique_ptr< const tenduke::jwt::JWTParser > create() const override
Creates tenduke::jwt::JWTParser, which does not validate signature.
Definition DefaultJWTParserFactory.cpp:28
std::unique_ptr< const tenduke::jwt::JWTParser > create(const std::shared_ptr< const tenduke::crypto::PublicKey > &publicKey, tenduke::crypto::MessageDigest::Algorithm algorithm) const override
Creates a tenduke::jwt::JWTParser, which validates the signature with given public key and message di...
Definition JWTParserFactory.h:15
Support for JSON Web Tokens.
Definition DefaultJWTParser.h:11
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7