-rw-r--r-- | include/opkele/consumer.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/include/opkele/consumer.h b/include/opkele/consumer.h index 9932315..f9939cf 100644 --- a/include/opkele/consumer.h +++ b/include/opkele/consumer.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __OPKELE_CONSUMER_H | 2 | #define __OPKELE_CONSUMER_H |
3 | 3 | ||
4 | #include <opkele/types.h> | 4 | #include <opkele/types.h> |
5 | #include <opkele/extension.h> | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * @file | 8 | * @file |
@@ -82,20 +83,22 @@ namespace opkele { | |||
82 | * @param identity the identity to verify | 83 | * @param identity the identity to verify |
83 | * @param return_to the return_to url to pass with the request | 84 | * @param return_to the return_to url to pass with the request |
84 | * @param trust_root the trust root to advertise with the request | 85 | * @param trust_root the trust root to advertise with the request |
86 | * @param ext pointer to an extension(s) hooks object | ||
85 | * @return the location string | 87 | * @return the location string |
86 | * @throw exception in case of error | 88 | * @throw exception in case of error |
87 | */ | 89 | */ |
88 | string checkid_immediate(const string& identity,const string& return_to,const string& trust_root=""); | 90 | string checkid_immediate(const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0); |
89 | /** | 91 | /** |
90 | * prepare the parameters for the checkid_setup | 92 | * prepare the parameters for the checkid_setup |
91 | * request. | 93 | * request. |
92 | * @param identity the identity to verify | 94 | * @param identity the identity to verify |
93 | * @param return_to the return_to url to pass with the request | 95 | * @param return_to the return_to url to pass with the request |
94 | * @param trust_root the trust root to advertise with the request | 96 | * @param trust_root the trust root to advertise with the request |
97 | * @param ext pointer to an extension(s) hooks object | ||
95 | * @return the location string | 98 | * @return the location string |
96 | * @throw exception in case of error | 99 | * @throw exception in case of error |
97 | */ | 100 | */ |
98 | string checkid_setup(const string& identity,const string& return_to,const string& trust_root=""); | 101 | string checkid_setup(const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0); |
99 | /** | 102 | /** |
100 | * the actual implementation behind checkid_immediate() and | 103 | * the actual implementation behind checkid_immediate() and |
101 | * checkid_setup() functions. | 104 | * checkid_setup() functions. |
@@ -103,24 +106,24 @@ namespace opkele { | |||
103 | * @param identity the identity to verify | 106 | * @param identity the identity to verify |
104 | * @param return_to the return_to url to pass with the request | 107 | * @param return_to the return_to url to pass with the request |
105 | * @param trust_root the trust root to advertise with the request | 108 | * @param trust_root the trust root to advertise with the request |
109 | * @param ext pointer to an extension(s) hooks object | ||
106 | * @return the location string | 110 | * @return the location string |
107 | * @throw exception in case of error | 111 | * @throw exception in case of error |
108 | */ | 112 | */ |
109 | string checkid_(mode_t mode,const string& identity,const string& return_to,const string& trust_root=""); | 113 | string checkid_(mode_t mode,const string& identity,const string& return_to,const string& trust_root="",extension_t *ext=0); |
110 | /** | 114 | /** |
111 | * verify the id_res response | 115 | * verify the id_res response |
112 | * @param pin the response parameters | 116 | * @param pin the response parameters |
113 | * @param identity the identity being checked (if not specified, extracted | 117 | * @param identity the identity being checked (if not specified, |
114 | * from the openid.identity parameter | 118 | * @param ext pointer to an extension(s) hooks object |
115 | * @throw id_res_mismatch in case of signature | 119 | * extracted from the openid.identity parameter |
116 | * mismatch | 120 | * @throw id_res_mismatch in case of signature mismatch |
117 | * @throw id_res_setup in case of | 121 | * @throw id_res_setup in case of openid.user_setup_url failure |
118 | * openid.user_setup_url failure (supposedly | 122 | * (supposedly checkid_immediate only) |
119 | * checkid_immediate only) | ||
120 | * @throw id_res_failed in case of failure | 123 | * @throw id_res_failed in case of failure |
121 | * @throw exception in case of other failures | 124 | * @throw exception in case of other failures |
122 | */ | 125 | */ |
123 | void id_res(const params_t& pin,const string& identity=""); | 126 | void id_res(const params_t& pin,const string& identity="",extension_t *ext=0); |
124 | /** | 127 | /** |
125 | * perform a check_authentication request. | 128 | * perform a check_authentication request. |
126 | * @param server the OpenID server | 129 | * @param server the OpenID server |