-rw-r--r-- | include/opkele/xconsumer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/opkele/xconsumer.h b/include/opkele/xconsumer.h new file mode 100644 index 0000000..14a8aaa --- a/dev/null +++ b/include/opkele/xconsumer.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef __OPKELE_XCONSUMER_H | ||
2 | #define __OPKELE_XCONSUMER_H | ||
3 | |||
4 | /** | ||
5 | * @file | ||
6 | * @brief OpenID consumer with built-in extension chain | ||
7 | */ | ||
8 | |||
9 | #include <opkele/extension_chain.h> | ||
10 | #include <opkele/consumer.h> | ||
11 | |||
12 | /** | ||
13 | * @brief the main opkele namespace | ||
14 | */ | ||
15 | namespace opkele { | ||
16 | |||
17 | /** | ||
18 | * Extended OpenID consumer implementation with built in | ||
19 | * extensions chain. | ||
20 | */ | ||
21 | class xconsumer_t : public consumer_t, public extension_chain_t { | ||
22 | public: | ||
23 | |||
24 | string checkid_immediate(const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0) { | ||
25 | return consumer_t::checkid_immediate(identity,return_to,trust_root,this); | ||
26 | } | ||
27 | string chekid_setup(const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0) { | ||
28 | return consumer_t::checkid_setup(identity,return_to,trust_root,this); | ||
29 | } | ||
30 | string checkid_(mode_t mode,const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0) { | ||
31 | return consumer_t::checkid_(mode,identity,return_to,trust_root,this); | ||
32 | } | ||
33 | void id_res(const params_t& pin,const string& identity="",extension_t *ext=0) { | ||
34 | consumer_t::id_res(pin,identity,this); | ||
35 | } | ||
36 | |||
37 | }; | ||
38 | |||
39 | } | ||
40 | |||
41 | #endif /* __OPKELE_XCONSUMER_H */ | ||