-rw-r--r-- | include/opkele/server.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/opkele/server.h b/include/opkele/server.h index 598eb47..e7e5bb3 100644 --- a/include/opkele/server.h +++ b/include/opkele/server.h | |||
@@ -1,99 +1,96 @@ | |||
1 | #ifndef __OPKELE_SERVER_H | 1 | #ifndef __OPKELE_SERVER_H |
2 | #define __OPKELE_SERVER_H | 2 | #define __OPKELE_SERVER_H |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * @file | 5 | * @file |
6 | * @brief OpenID server-side functionality | 6 | * @brief OpenID server-side functionality |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <opkele/types.h> | 9 | #include <opkele/types.h> |
10 | #include <opkele/extension.h> | 10 | #include <opkele/extension.h> |
11 | 11 | ||
12 | /** | ||
13 | * @brief the main opkele namespace | ||
14 | */ | ||
15 | namespace opkele { | 12 | namespace opkele { |
16 | 13 | ||
17 | /** | 14 | /** |
18 | * implementation of basic server functionality | 15 | * implementation of basic server functionality |
19 | */ | 16 | */ |
20 | class server_t { | 17 | class server_t { |
21 | public: | 18 | public: |
22 | 19 | ||
23 | /** | 20 | /** |
24 | * allocate the new association. The function should be overridden | 21 | * allocate the new association. The function should be overridden |
25 | * in the real implementation to provide persistent assocations | 22 | * in the real implementation to provide persistent assocations |
26 | * store. | 23 | * store. |
27 | * @param mode the mode of request being processed to base the | 24 | * @param mode the mode of request being processed to base the |
28 | * statelessness of the association upon | 25 | * statelessness of the association upon |
29 | * @return the auto_ptr<> for the newly allocated association_t object | 26 | * @return the auto_ptr<> for the newly allocated association_t object |
30 | */ | 27 | */ |
31 | virtual assoc_t alloc_assoc(mode_t mode) = 0; | 28 | virtual assoc_t alloc_assoc(mode_t mode) = 0; |
32 | /** | 29 | /** |
33 | * retrieve the association. The function should be overridden in | 30 | * retrieve the association. The function should be overridden in |
34 | * the reqal implementation to provide persistent assocations | 31 | * the reqal implementation to provide persistent assocations |
35 | * store. | 32 | * store. |
36 | * @param h association handle | 33 | * @param h association handle |
37 | * @return the auto_ptr<> for the newly allocated association_t object | 34 | * @return the auto_ptr<> for the newly allocated association_t object |
38 | * @throw failed_lookup in case of failure | 35 | * @throw failed_lookup in case of failure |
39 | */ | 36 | */ |
40 | virtual assoc_t retrieve_assoc(const string& h) = 0; | 37 | virtual assoc_t retrieve_assoc(const string& h) = 0; |
41 | 38 | ||
42 | /** | 39 | /** |
43 | * validate the identity. | 40 | * validate the identity. |
44 | * @param assoc association object | 41 | * @param assoc association object |
45 | * @param pin incoming request parameters | 42 | * @param pin incoming request parameters |
46 | * @param identity being verified | 43 | * @param identity being verified |
47 | * @param trust_root presented in the request | 44 | * @param trust_root presented in the request |
48 | * @throw exception if identity can not be confirmed | 45 | * @throw exception if identity can not be confirmed |
49 | */ | 46 | */ |
50 | virtual void validate(const association_t& assoc,const params_t& pin,const string& identity,const string& trust_root) = 0; | 47 | virtual void validate(const association_t& assoc,const params_t& pin,const string& identity,const string& trust_root) = 0; |
51 | 48 | ||
52 | 49 | ||
53 | /** | 50 | /** |
54 | * process the associate request. | 51 | * process the associate request. |
55 | * @param pin the incoming request parameters | 52 | * @param pin the incoming request parameters |
56 | * @param pout the store for the response parameters | 53 | * @param pout the store for the response parameters |
57 | */ | 54 | */ |
58 | void associate(const params_t& pin,params_t& pout); | 55 | void associate(const params_t& pin,params_t& pout); |
59 | /** | 56 | /** |
60 | * process the checkid_immediate request. | 57 | * process the checkid_immediate request. |
61 | * @param pin the incoming request parameters | 58 | * @param pin the incoming request parameters |
62 | * @param return_to reference to the object to store return_to url to | 59 | * @param return_to reference to the object to store return_to url to |
63 | * @param pout the response parameters | 60 | * @param pout the response parameters |
64 | * @param ext pointer to the extension hooks object | 61 | * @param ext pointer to the extension hooks object |
65 | * @throw exception in case of errors or negative reply | 62 | * @throw exception in case of errors or negative reply |
66 | */ | 63 | */ |
67 | virtual void checkid_immediate(const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); | 64 | virtual void checkid_immediate(const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); |
68 | /** | 65 | /** |
69 | * process the checkid_setup request. | 66 | * process the checkid_setup request. |
70 | * @param pin the incoming request parameters | 67 | * @param pin the incoming request parameters |
71 | * @param return_to reference to the object to store return_to url to | 68 | * @param return_to reference to the object to store return_to url to |
72 | * @param pout the response parameters | 69 | * @param pout the response parameters |
73 | * @param ext pointer to the extension hooks object | 70 | * @param ext pointer to the extension hooks object |
74 | * @throw exception in case of errors or negative reply | 71 | * @throw exception in case of errors or negative reply |
75 | */ | 72 | */ |
76 | virtual void checkid_setup(const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); | 73 | virtual void checkid_setup(const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); |
77 | /** | 74 | /** |
78 | * the actual functionality behind checkid_immediate() and | 75 | * the actual functionality behind checkid_immediate() and |
79 | * checkid_setup() | 76 | * checkid_setup() |
80 | * @param mode the request being processed (either | 77 | * @param mode the request being processed (either |
81 | * mode_checkid_immediate or mode_checkid_setup) | 78 | * mode_checkid_immediate or mode_checkid_setup) |
82 | * @param pin the incoming request parameters | 79 | * @param pin the incoming request parameters |
83 | * @param return_to reference to the object to store return_to url to | 80 | * @param return_to reference to the object to store return_to url to |
84 | * @param pout the response parameters | 81 | * @param pout the response parameters |
85 | * @param ext pointer to the extension hooks object | 82 | * @param ext pointer to the extension hooks object |
86 | * @throw exception in case of errors or negative reply | 83 | * @throw exception in case of errors or negative reply |
87 | */ | 84 | */ |
88 | virtual void checkid_(mode_t mode,const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); | 85 | virtual void checkid_(mode_t mode,const params_t& pin,string& return_to,params_t& pout,extension_t *ext=0); |
89 | /** | 86 | /** |
90 | * process the check_authentication request. | 87 | * process the check_authentication request. |
91 | * @param pin incoming request parameters | 88 | * @param pin incoming request parameters |
92 | * @param pout response parameters | 89 | * @param pout response parameters |
93 | */ | 90 | */ |
94 | void check_authentication(const params_t& pin,params_t& pout); | 91 | void check_authentication(const params_t& pin,params_t& pout); |
95 | }; | 92 | }; |
96 | 93 | ||
97 | } | 94 | } |
98 | 95 | ||
99 | #endif /* __OPKELE_SERVER_H */ | 96 | #endif /* __OPKELE_SERVER_H */ |