10Duke Scale C++ Client
Loading...
Searching...
No Matches
DefaultJWTParser.h
1#ifndef TENDUKE_JWT_DEFAULTJWTPARSER_H
2#define TENDUKE_JWT_DEFAULTJWTPARSER_H
3
4#include "./JWTParser.h"
5#include "./JWTSignatureValidator.h"
6#include "json/JSONParser.h"
7#include "utl/Base64Decoder.h"
8
9#include <memory>
10
11namespace tenduke { namespace jwt {
12
17{
18public:
26 std::shared_ptr<const tenduke::json::JSONParser> jsonParser,
27 std::shared_ptr<const tenduke::utl::Base64Decoder> base64Decoder,
28 std::shared_ptr<const tenduke::jwt::JWTSignatureValidator> signatureValidator
29 );
30
31// JWTParser interface
32public:
33 tenduke::jwt::JWT from(const std::string &value) const override;
34
35private:
36 const std::shared_ptr<const tenduke::json::JSONParser> parseJson;
37 const std::shared_ptr<const tenduke::utl::Base64Decoder> base64;
38 const std::shared_ptr<const tenduke::jwt::JWTSignatureValidator> signature;
39};
40
41}}
42
43#endif // TENDUKE_JWT_DEFAULTJWTPARSER_H
Default implementation of tenduke::jwt::JWTParser.
Definition DefaultJWTParser.h:17
tenduke::jwt::JWT from(const std::string &value) const override
Parses tenduke::jwt::JWT from given string.
Definition DefaultJWTParser.cpp:28
Parses JWT.
Definition JWTParser.h:15
Very simple JWT implementation.
Definition JWT.h:31
Support for JSON Web Tokens.
Definition DefaultJWTParser.h:11
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7