summaryrefslogtreecommitdiffabout
path: root/include/opkele/extension.h
Unidiff
Diffstat (limited to 'include/opkele/extension.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/extension.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/opkele/extension.h b/include/opkele/extension.h
index ea0c74c..513672f 100644
--- a/include/opkele/extension.h
+++ b/include/opkele/extension.h
@@ -1,63 +1,65 @@
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/types.h> 9#include <opkele/types.h>
10 10
11namespace opkele { 11namespace opkele {
12 12
13 /** 13 /**
14 * OpenID extension hooks base class 14 * OpenID extension hooks base class
15 */ 15 */
16 class extension_t { 16 class extension_t {
17 public: 17 public:
18
19 virtual ~extension_t() { }
18 /** 20 /**
19 * hook called by consumer before submitting data to OpenID server. 21 * hook called by consumer before submitting data to OpenID server.
20 * It is supposed to manipulate parameters list. 22 * It is supposed to manipulate parameters list.
21 * @param p parameters about to be submitted to server 23 * @param p parameters about to be submitted to server
22 * @param identity identity being verified. It may differ from the 24 * @param identity identity being verified. It may differ from the
23 * one available in parameters list in case of delegation 25 * one available in parameters list in case of delegation
24 * @see consumer_t::checkid_ 26 * @see consumer_t::checkid_
25 * @see consumer_t::checkid_immediate 27 * @see consumer_t::checkid_immediate
26 * @see consumer_t::checkid_setup 28 * @see consumer_t::checkid_setup
27 */ 29 */
28 virtual void checkid_hook(params_t& p,const string& identity); 30 virtual void checkid_hook(params_t& p,const string& identity);
29 /** 31 /**
30 * hook called by consumer after identity information received from 32 * hook called by consumer after identity information received from
31 * OpenID server is verified. 33 * OpenID server is verified.
32 * @param p parameters received from server 34 * @param p parameters received from server
33 * @param sp signed parameters received from server with 'openid.' 35 * @param sp signed parameters received from server with 'openid.'
34 * leader stripped 36 * leader stripped
35 * @param identity identity confirmed. May differ from the one 37 * @param identity identity confirmed. May differ from the one
36 * available in parameters list in case of delegation. May also be 38 * available in parameters list in case of delegation. May also be
37 * empty which means - extract one from parameters 39 * empty which means - extract one from parameters
38 * @see consumer_t::id_res 40 * @see consumer_t::id_res
39 */ 41 */
40 virtual void id_res_hook(const params_t& p,const params_t& sp,const string& identity); 42 virtual void id_res_hook(const params_t& p,const params_t& sp,const string& identity);
41 43
42 /** 44 /**
43 * hook called by server before returning information to consumer. 45 * hook called by server before returning information to consumer.
44 * The hook may manipulate output parameters. It is important to 46 * The hook may manipulate output parameters. It is important to
45 * note that modified pout["signed"] is used for signing response. 47 * note that modified pout["signed"] is used for signing response.
46 * @param pin request parameters list with "openid." prefix 48 * @param pin request parameters list with "openid." prefix
47 * @param pout response parameters list without "openid." prefix 49 * @param pout response parameters list without "openid." prefix
48 * @see server_t::checkid_ 50 * @see server_t::checkid_
49 * @see server_t::checkid_immediate 51 * @see server_t::checkid_immediate
50 * @see server_t::checkid_setup 52 * @see server_t::checkid_setup
51 */ 53 */
52 virtual void checkid_hook(const params_t& pin,params_t& pout); 54 virtual void checkid_hook(const params_t& pin,params_t& pout);
53 55
54 /** 56 /**
55 * Casts the object to pointer to itself. For convenient passing 57 * Casts the object to pointer to itself. For convenient passing
56 * of pointer. 58 * of pointer.
57 */ 59 */
58 operator extension_t*(void) { return this; } 60 operator extension_t*(void) { return this; }
59 }; 61 };
60 62
61} 63}
62 64
63#endif /* __OPKELE_EXTENSION_H */ 65#endif /* __OPKELE_EXTENSION_H */