-rw-r--r-- | include/opkele/extension.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/opkele/extension.h b/include/opkele/extension.h index 37bcb90..38f61e3 100644 --- a/include/opkele/extension.h +++ b/include/opkele/extension.h | |||
@@ -1,61 +1,69 @@ | |||
1 | #ifndef __OPKELE_EXTENSION_H | 1 | #ifndef __OPKELE_EXTENSION_H |
2 | #define __OPKELE_EXTENSION_H | 2 | #define __OPKELE_EXTENSION_H |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * @file | 5 | * @file |
6 | * @brief extensions framework basics | 6 | * @brief extensions framework basics |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <opkele/opkele-config.h> | 9 | #include <opkele/opkele-config.h> |
10 | #include <opkele/types.h> | 10 | #include <opkele/types.h> |
11 | 11 | ||
12 | namespace opkele { | 12 | namespace opkele { |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * OpenID extension hooks base class | 15 | * OpenID extension hooks base class |
16 | */ | 16 | */ |
17 | class extension_t { | 17 | class extension_t { |
18 | public: | 18 | public: |
19 | 19 | ||
20 | virtual ~extension_t() { } | 20 | virtual ~extension_t() { } |
21 | 21 | ||
22 | /** | 22 | /** |
23 | * hook called by RP before submitting the message to OP. | 23 | * hook called by RP before submitting the message to OP. |
24 | * @param om openid message to be submit | 24 | * @param om openid message to be submit |
25 | */ | 25 | */ |
26 | virtual void rp_checkid_hook(basic_openid_message& om); | 26 | virtual void rp_checkid_hook(basic_openid_message& om); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * hook called by RP after verifying information received from OP. | 29 | * hook called by RP after verifying information received from OP. |
30 | * @param om openid message received | 30 | * @param om openid message received |
31 | * @param sp signed part of the message | 31 | * @param sp signed part of the message |
32 | */ | 32 | */ |
33 | virtual void rp_id_res_hook(const basic_openid_message& om, | 33 | virtual void rp_id_res_hook(const basic_openid_message& om, |
34 | const basic_openid_message& sp); | 34 | const basic_openid_message& sp); |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * hook called by OP after parsing incoming message | 37 | * hook called by OP after parsing incoming message |
38 | * @param inm message received from RP | 38 | * @param inm message received from RP |
39 | */ | 39 | */ |
40 | virtual void op_checkid_hook(const basic_openid_message& inm); | 40 | virtual void op_checkid_hook(const basic_openid_message& inm); |
41 | /** | 41 | /** |
42 | * hook called by OP before signing the reply to RP | 42 | * hook called by OP before signing the reply to RP |
43 | * @param oum message to be sent to RP | 43 | * @param oum message to be sent to RP |
44 | */ | 44 | */ |
45 | virtual void op_id_res_hook(basic_openid_message& oum); | 45 | virtual void op_id_res_hook(basic_openid_message& oum); |
46 | 46 | ||
47 | /** | ||
48 | * @name deprecated hooks, used by the deprecated consumer_t and | ||
49 | * server_t implementations | ||
50 | * @{ | ||
51 | */ | ||
47 | virtual void checkid_hook(basic_openid_message& om) OPKELE_DEPRECATE; | 52 | virtual void checkid_hook(basic_openid_message& om) OPKELE_DEPRECATE; |
48 | virtual void id_res_hook(const basic_openid_message& om, | 53 | virtual void id_res_hook(const basic_openid_message& om, |
49 | const basic_openid_message& sp) OPKELE_DEPRECATE; | 54 | const basic_openid_message& sp) OPKELE_DEPRECATE; |
50 | virtual void checkid_hook(const basic_openid_message& inm,basic_openid_message& oum); | 55 | virtual void checkid_hook(const basic_openid_message& inm,basic_openid_message& oum); |
56 | /** | ||
57 | * @} | ||
58 | */ | ||
51 | 59 | ||
52 | /** | 60 | /** |
53 | * Casts the object to pointer to itself. For convenient passing | 61 | * Casts the object to pointer to itself. For convenient passing |
54 | * of pointer. | 62 | * of pointer. |
55 | */ | 63 | */ |
56 | operator extension_t*(void) { return this; } | 64 | operator extension_t*(void) { return this; } |
57 | }; | 65 | }; |
58 | 66 | ||
59 | } | 67 | } |
60 | 68 | ||
61 | #endif /* __OPKELE_EXTENSION_H */ | 69 | #endif /* __OPKELE_EXTENSION_H */ |