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