10Duke Enterprise C++ Client
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
9namespace tenduke { namespace ee {
10
17{
18public:
19 virtual ~DeserializeStateFromJSON() {}
20
27 const std::shared_ptr<const ::tenduke::jwt::JWTParserFactory> &newJWTParser,
28 const std::shared_ptr<const ::tenduke::json::JSONParser> &parseJSON
29 );
30
36 ::tenduke::ee::ClientState from(const std::string &stateSerializedAsJSON) const;
37
38protected:
44 ::tenduke::ee::ClientState parseState(const ::tenduke::json::JSONObject * document) const;
45
51 ::std::shared_ptr<::tenduke::oidc::OIDCState> deserializeOIDCState(const ::tenduke::json::JSONObject * oidcSession) const;
52
53private:
54 const std::shared_ptr<const ::tenduke::jwt::JWTParserFactory> newJWTParser;
55 const std::shared_ptr<const ::tenduke::json::JSONParser> parseJSON;
56};
57
58}}
59
60
61#endif //TENDUKE_EE_DESERIALIZESTATEFROMJSON_H
Service for deserializing client state from JSON.
Definition DeserializeStateFromJSON.h:17
::tenduke::ee::ClientState parseState(const ::tenduke::json::JSONObject *document) const
Parses the state from JSON object.
Definition DeserializeStateFromJSON.cpp:62
::std::shared_ptr<::tenduke::oidc::OIDCState > deserializeOIDCState(const ::tenduke::json::JSONObject *oidcSession) const
Parses OIDC-state from the state.
Definition DeserializeStateFromJSON.cpp:25
::tenduke::ee::ClientState from(const std::string &stateSerializedAsJSON) const
Deserializes the state from JSON.
Definition DeserializeStateFromJSON.cpp:76
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4
Client state.
Definition ClientState.h:15