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