identt
SydentQuery.hpp
Go to the documentation of this file.
1 
33 #ifndef _IDENTT_QUERY_SYDENTQUERY_HPP_
34 #define _IDENTT_QUERY_SYDENTQUERY_HPP_
35 
36 #include <utils/BaseUtils.hpp>
37 #include <map>
38 
39 
40 #define IDENTT_SYDENT_ERROR_MIN 101
41 #define M_BAD_JSON 101
42 #define M_DESTINATION_REJECTED 102
43 #define M_EMAIL_SEND_ERROR 103
44 #define M_INCORRECT_CLIENT_SECRET 104
45 #define M_INVALID_EMAIL 105
46 #define M_INVALID_PARAM 106
47 #define M_INVALID_PHONE_NUMBER 107
48 #define M_MISSING_PARAMS 108
49 #define M_NOT_JSON 109
50 #define M_NO_VALID_SESSION 110
51 #define M_SESSION_EXPIRED 111
52 #define M_SESSION_NOT_VALIDATED 112
53 #define M_UNKNOWN 113
54 #define M_UNKNOWN_PEER 114
55 #define M_VERIFICATION_FAILED 115
56 #define M_THREEPID_IN_USE 116
57 #define IDENTT_SYDENT_ERROR_MAX 116
58 
59 namespace identt {
60 namespace query {
61 
62 const static std::map<int, std::string> SydentErrors = {
63  { M_BAD_JSON, "M_BAD_JSON"},
64  { M_DESTINATION_REJECTED, "M_DESTINATION_REJECTED"},
65  { M_EMAIL_SEND_ERROR, "M_EMAIL_SEND_ERROR"},
66  { M_INCORRECT_CLIENT_SECRET, "M_INCORRECT_CLIENT_SECRET"},
67  { M_INVALID_EMAIL, "M_INVALID_EMAIL"},
68  { M_INVALID_PARAM, "M_INVALID_PARAM"},
69  { M_INVALID_PHONE_NUMBER, "M_INVALID_PHONE_NUMBER"},
70  { M_MISSING_PARAMS, "M_MISSING_PARAMS"},
71  { M_NOT_JSON, "M_NOT_JSON"},
72  { M_NO_VALID_SESSION, "M_NO_VALID_SESSION"},
73  { M_SESSION_EXPIRED, "M_SESSION_EXPIRED"},
74  { M_SESSION_NOT_VALIDATED, "M_SESSION_NOT_VALIDATED"},
75  { M_UNKNOWN, "M_UNKNOWN"},
76  { M_UNKNOWN_PEER, "M_UNKNOWN_PEER"},
77  { M_VERIFICATION_FAILED, "M_VERIFICATION_FAILED"},
78  { M_THREEPID_IN_USE, "THREEPID_IN_USE"}
79 };
80 
82 const static std::map<std::string,std::string> ValidIsdCodes = {
83  { "IN", "91" },
84  { "US", "1" },
85  { "CA", "1" },
86  { "GB", "44" },
87  { "AE", "971" }
88 };
89 
91 class SydentException : public JdException {
92  using JdException::JdException;
93 };
94 
95 } // namspace query
96 } // namspace identt
97 
98 #endif /* _IDENTT_QUERY_SYDENTQUERY_HPP_ */
Sydent Exceptions.
Definition: SydentQuery.hpp:91
Definition: BaseUtils.hpp:52
Definition: CryptoBase.hpp:49