10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
DeserializeStateFromJSON.h
1#ifndef TENDUKE_EE_DESERIALIZESTATEFROMJSON_H
2#define TENDUKE_EE_DESERIALIZESTATEFROMJSON_H
3
4#include "./ClientState.h"
5#include "json/JSONObject.h"
6#include "json/JSONParser.h"
7#include "jwt/JWTParserFactory.h"
8#include "jwt/JWTSignatureValidator.h"
9
10#include <memory>
11#include <string>
12
13namespace tenduke { namespace ee {
14
26{
27public:
28 virtual ~DeserializeStateFromJSON() {}
29
41 const std::shared_ptr<const ::tenduke::jwt::JWTParserFactory> &newJWTParser,
42 const std::shared_ptr<const ::tenduke::json::JSONParser> &parseJSON,
43 const std::shared_ptr<::tenduke::jwt::JWTSignatureValidator> &signatureValidator,
44 std::string expectedIssuer,
45 std::string clientId
46 );
47
56 ::tenduke::ee::ClientState from(const std::string &stateSerializedAsJSON) const;
57
58protected:
64 ::tenduke::ee::ClientState parseState(const ::tenduke::json::JSONObject * document) const;
65
71 ::std::shared_ptr<::tenduke::oidc::OIDCState> deserializeOIDCState(const ::tenduke::json::JSONObject * oidcSession) const;
72
73private:
74 const std::shared_ptr<const ::tenduke::jwt::JWTParserFactory> newJWTParser;
75 const std::shared_ptr<const ::tenduke::json::JSONParser> parseJSON;
76 const std::shared_ptr<::tenduke::jwt::JWTSignatureValidator> signatureValidator;
77 const std::string expectedIssuer;
78 const std::string clientId;
79};
80
81}}
82
83
84#endif //TENDUKE_EE_DESERIALIZESTATEFROMJSON_H
::tenduke::ee::ClientState parseState(const ::tenduke::json::JSONObject *document) const
Parses the state from JSON object.
Definition DeserializeStateFromJSON.cpp:106
::std::shared_ptr<::tenduke::oidc::OIDCState > deserializeOIDCState(const ::tenduke::json::JSONObject *oidcSession) const
Parses OIDC-state from the state.
Definition DeserializeStateFromJSON.cpp:48
::tenduke::ee::ClientState from(const std::string &stateSerializedAsJSON) const
Deserializes the state from JSON.
Definition DeserializeStateFromJSON.cpp:120
DeserializeStateFromJSON(const std::shared_ptr< const ::tenduke::jwt::JWTParserFactory > &newJWTParser, const std::shared_ptr< const ::tenduke::json::JSONParser > &parseJSON, const std::shared_ptr<::tenduke::jwt::JWTSignatureValidator > &signatureValidator, std::string expectedIssuer, std::string clientId)
Constructs new instance.
Definition DeserializeStateFromJSON.cpp:149
Classes, functions and globals of 10Duke Enterprise C++ Client.
Definition APIRequest.h:4
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4
Client state.
Definition ClientState.h:15