summaryrefslogtreecommitdiffabout
path: root/include/opkele/extension_chain.h
Unidiff
Diffstat (limited to 'include/opkele/extension_chain.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/extension_chain.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/opkele/extension_chain.h b/include/opkele/extension_chain.h
new file mode 100644
index 0000000..955f4d5
--- a/dev/null
+++ b/include/opkele/extension_chain.h
@@ -0,0 +1,50 @@
1#ifndef __OPKELE_EXTENSION_CHAIN_H
2#define __OPKELE_EXTENSION_CHAIN_H
3
4/**
5 * @file
6 * @brief extension chain extension
7 */
8
9#include <list>
10#include <opkele/extension.h>
11
12/**
13 * @brief the main opkele namespace
14 */
15namespace opkele {
16 using std::list;
17
18 /**
19 * OpenID extensions chain used to combine extensions, it is actually an
20 * stl list of pointers to extensions.
21 */
22 class extension_chain_t : public extension_t, public list<extension_t*> {
23 public:
24
25 /**
26 * Default constructor creates an empty chain
27 */
28 extension_chain_t() { }
29 /**
30 * Create extension chain with a single extension in it
31 */
32 extension_chain_t(extension_t *e) { push_back(e); }
33
34 /**
35 * Implementation of consumer's checkid hook
36 */
37 virtual void checkid_hook(params_t& p,const string& identity);
38 /**
39 * Implementation of consumer's id_res hook
40 */
41 virtual void id_res_hook(const params_t& p,const params_t& sp,const string& identity);
42 /**
43 * Implementation of server's checkid_hook
44 */
45 virtual void checkid_hook(const params_t& pin,params_t& pout);
46 };
47
48}
49
50#endif /* __OPKELE_EXTENSION_CHAIN_H */