summaryrefslogtreecommitdiffabout
path: root/include
Unidiff
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/Makefile.am3
-rw-r--r--include/opkele/extension_chain.h50
2 files changed, 52 insertions, 1 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 4b9b02a..2c190b8 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -4,10 +4,11 @@ nobase_include_HEADERS = \
4 opkele/types.h \ 4 opkele/types.h \
5 opkele/association.h \ 5 opkele/association.h \
6 opkele/exception.h \ 6 opkele/exception.h \
7 opkele/server.h \ 7 opkele/server.h \
8 opkele/consumer.h \ 8 opkele/consumer.h \
9 opkele/extension.h \ 9 opkele/extension.h \
10 opkele/sreg.h 10 opkele/sreg.h \
11 opkele/extension_chain.h
11EXTRA_DIST = \ 12EXTRA_DIST = \
12 opkele/data.h \ 13 opkele/data.h \
13 opkele/util.h 14 opkele/util.h
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 */