-rw-r--r-- | include/opkele/basic_op.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/opkele/basic_op.h b/include/opkele/basic_op.h index 0e3231d..0326508 100644 --- a/include/opkele/basic_op.h +++ b/include/opkele/basic_op.h | |||
@@ -89,162 +89,162 @@ namespace opkele { | |||
89 | */ | 89 | */ |
90 | const string& get_identity() const; | 90 | const string& get_identity() const; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * Is identifier supposed to be selected on our side? | 93 | * Is identifier supposed to be selected on our side? |
94 | * @return true if identity is a special identifier select URI | 94 | * @return true if identity is a special identifier select URI |
95 | */ | 95 | */ |
96 | bool is_id_select() const; | 96 | bool is_id_select() const; |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Select the identity for identifier select request | 99 | * Select the identity for identifier select request |
100 | * @param cid claimed identifier | 100 | * @param cid claimed identifier |
101 | * @param lid local identifier | 101 | * @param lid local identifier |
102 | */ | 102 | */ |
103 | void select_identity(const string& cid,const string& lid); | 103 | void select_identity(const string& cid,const string& lid); |
104 | /** | 104 | /** |
105 | * Set claimed identifier (for instance if it's supposed to have | 105 | * Set claimed identifier (for instance if it's supposed to have |
106 | * fragment part) | 106 | * fragment part) |
107 | * @param cid claimed identifier | 107 | * @param cid claimed identifier |
108 | */ | 108 | */ |
109 | void set_claimed_id(const string& cid); | 109 | void set_claimed_id(const string& cid); |
110 | /** | 110 | /** |
111 | * @} | 111 | * @} |
112 | */ | 112 | */ |
113 | 113 | ||
114 | /** @name OpenID operations | 114 | /** @name OpenID operations |
115 | * @{ | 115 | * @{ |
116 | */ | 116 | */ |
117 | /** | 117 | /** |
118 | * Establish association with RP | 118 | * Establish association with RP |
119 | * @param oum reply message | 119 | * @param oum reply message |
120 | * @param inm request message | 120 | * @param inm request message |
121 | */ | 121 | */ |
122 | basic_openid_message& associate( | 122 | basic_openid_message& associate( |
123 | basic_openid_message& oum, | 123 | basic_openid_message& oum, |
124 | const basic_openid_message& inm); | 124 | const basic_openid_message& inm); |
125 | 125 | ||
126 | /** | 126 | /** |
127 | * Parse the checkid_* request. The function parses input message, | 127 | * Parse the checkid_* request. The function parses input message, |
128 | * retrieves the information needed for further processing, | 128 | * retrieves the information needed for further processing, |
129 | * verifies what can be verified at this stage. | 129 | * verifies what can be verified at this stage. |
130 | * @param inm incoming OpenID message | 130 | * @param inm incoming OpenID message |
131 | * @param ext extension/chain of extensions supported | 131 | * @param ext extension/chain of extensions supported |
132 | */ | 132 | */ |
133 | void checkid_(const basic_openid_message& inm,extension_t *ext=0); | 133 | void checkid_(const basic_openid_message& inm,extension_t *ext=0); |
134 | /** | 134 | /** |
135 | * Build and sign a positive assertion message | 135 | * Build and sign a positive assertion message |
136 | * @param om outpu OpenID message | 136 | * @param om outpu OpenID message |
137 | * @param ext extension/chain of extensions supported | 137 | * @param ext extension/chain of extensions supported |
138 | * @return reference to om | 138 | * @return reference to om |
139 | */ | 139 | */ |
140 | basic_openid_message& id_res(basic_openid_message& om, | 140 | basic_openid_message& id_res(basic_openid_message& om, |
141 | extension_t *ext=0); | 141 | extension_t *ext=0); |
142 | /** | 142 | /** |
143 | * Build a 'cancel' negative assertion | 143 | * Build a 'cancel' negative assertion |
144 | * @param om output OpenID message | 144 | * @param om output OpenID message |
145 | * @return reference to om | 145 | * @return reference to om |
146 | */ | 146 | */ |
147 | basic_openid_message& cancel(basic_openid_message& om); | 147 | basic_openid_message& cancel(basic_openid_message& om); |
148 | /** | 148 | /** |
149 | * Build an 'error' reply | 149 | * Build an 'error' reply |
150 | * @param om output OpenID message | 150 | * @param om output OpenID message |
151 | * @param error a human-readable message indicating the cause | 151 | * @param error a human-readable message indicating the cause |
152 | * @param contact contact address for the server administrator (can be empty) | 152 | * @param contact contact address for the server administrator (can be empty) |
153 | * @param reference a reference token (can be empty) | 153 | * @param reference a reference token (can be empty) |
154 | * @return reference to om | 154 | * @return reference to om |
155 | */ | 155 | */ |
156 | basic_openid_message& error(basic_openid_message& om, | 156 | basic_openid_message& error(basic_openid_message& om, |
157 | const string& error,const string& contact, | 157 | const string& error,const string& contact, |
158 | const string& reference ); | 158 | const string& reference ); |
159 | /** | 159 | /** |
160 | * Build a setup_needed reply to checkid_immediate request | 160 | * Build a setup_needed reply to checkid_immediate request |
161 | * @param oum output OpenID message | 161 | * @param oum output OpenID message |
162 | * @param inm incoming OpenID request being processed | 162 | * @param inm incoming OpenID request being processed |
163 | * @return reference to oum | 163 | * @return reference to oum |
164 | */ | 164 | */ |
165 | basic_openid_message& setup_needed( | 165 | basic_openid_message& setup_needed( |
166 | basic_openid_message& oum,const basic_openid_message& inm); | 166 | basic_openid_message& oum,const basic_openid_message& inm); |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * Process check_authentication request | 169 | * Process check_authentication request |
170 | * @param oum output OpenID message | 170 | * @param oum output OpenID message |
171 | * @param inm incoming request | 171 | * @param inm incoming request |
172 | * @return reference to oum | 172 | * @return reference to oum |
173 | */ | 173 | */ |
174 | basic_openid_message& check_authentication( | 174 | basic_openid_message& check_authentication( |
175 | basic_openid_message& oum,const basic_openid_message& inm); | 175 | basic_openid_message& oum,const basic_openid_message& inm); |
176 | /** | 176 | /** |
177 | * @} | 177 | * @} |
178 | */ | 178 | */ |
179 | 179 | ||
180 | /** | 180 | /** |
181 | * Verify return_to url. The default implementation checks whether | 181 | * Verify return_to url. The default implementation checks whether |
182 | * return_to URI matches the realm | 182 | * return_to URI matches the realm |
183 | * @throw bad_realm in case of invalid realm | 183 | * @throw bad_realm in case of invalid realm |
184 | * @throw bad_return_to if return_to doesn't match the realm | 184 | * @throw bad_return_to if return_to doesn't match the realm |
185 | * @see verify_op::verify_return_to() | 185 | * @see verify_OP::verify_return_to() |
186 | */ | 186 | */ |
187 | virtual void verify_return_to(); | 187 | virtual void verify_return_to(); |
188 | 188 | ||
189 | /** | 189 | /** |
190 | * @name Global persistent store API | 190 | * @name Global persistent store API |
191 | * These functions are related to the associations with RPs storage | 191 | * These functions are related to the associations with RPs storage |
192 | * and retrieval and nonce management. | 192 | * and retrieval and nonce management. |
193 | * @{ | 193 | * @{ |
194 | */ | 194 | */ |
195 | /** | 195 | /** |
196 | * Allocate association. | 196 | * Allocate association. |
197 | * @param type association type | 197 | * @param type association type |
198 | * @param kl association key length | 198 | * @param kl association key length |
199 | * @param sl true if the association is stateless | 199 | * @param sl true if the association is stateless |
200 | * @return association object | 200 | * @return association object |
201 | */ | 201 | */ |
202 | virtual assoc_t alloc_assoc(const string& type,size_t kl,bool sl) = 0; | 202 | virtual assoc_t alloc_assoc(const string& type,size_t kl,bool sl) = 0; |
203 | /** | 203 | /** |
204 | * Retrieve valid unexpired association | 204 | * Retrieve valid unexpired association |
205 | * @param handle association handle | 205 | * @param handle association handle |
206 | * @return association object | 206 | * @return association object |
207 | */ | 207 | */ |
208 | virtual assoc_t retrieve_assoc(const string& handle) = 0; | 208 | virtual assoc_t retrieve_assoc(const string& handle) = 0; |
209 | /** | 209 | /** |
210 | * Allocate nonce. | 210 | * Allocate nonce. |
211 | * @param nonce input-output parameter containing timestamp part of | 211 | * @param nonce input-output parameter containing timestamp part of |
212 | * the nonce on input | 212 | * the nonce on input |
213 | * @param sl true if the nonce is | 213 | * @param sl true if the nonce is |
214 | * @return reference to nonce | 214 | * @return reference to nonce |
215 | * @throw failed_lookup if no such valid unexpired association | 215 | * @throw failed_lookup if no such valid unexpired association |
216 | * could be retrieved | 216 | * could be retrieved |
217 | */ | 217 | */ |
218 | virtual string& alloc_nonce(string& nonce) = 0; | 218 | virtual string& alloc_nonce(string& nonce) = 0; |
219 | /** | 219 | /** |
220 | * Check nonce validity | 220 | * Check nonce validity |
221 | * @param nonce nonce to check | 221 | * @param nonce nonce to check |
222 | * @return true if nonce found and isn't yet invalidated | 222 | * @return true if nonce found and isn't yet invalidated |
223 | */ | 223 | */ |
224 | virtual bool check_nonce(const string& nonce) = 0; | 224 | virtual bool check_nonce(const string& nonce) = 0; |
225 | /** | 225 | /** |
226 | * Invalidate nonce | 226 | * Invalidate nonce |
227 | * @param nonce nonce to check | 227 | * @param nonce nonce to check |
228 | */ | 228 | */ |
229 | virtual void invalidate_nonce(const string& nonce) = 0; | 229 | virtual void invalidate_nonce(const string& nonce) = 0; |
230 | /** | 230 | /** |
231 | * @} | 231 | * @} |
232 | */ | 232 | */ |
233 | 233 | ||
234 | /** | 234 | /** |
235 | * @name Site particulars API | 235 | * @name Site particulars API |
236 | * @{ | 236 | * @{ |
237 | */ | 237 | */ |
238 | /** | 238 | /** |
239 | * Query the absolute URL of the op endpoint | 239 | * Query the absolute URL of the op endpoint |
240 | * @return fully qualified url of the OP endpoint | 240 | * @return fully qualified url of the OP endpoint |
241 | */ | 241 | */ |
242 | virtual const string get_op_endpoint() const = 0; | 242 | virtual const string get_op_endpoint() const = 0; |
243 | /** | 243 | /** |
244 | * @} | 244 | * @} |
245 | */ | 245 | */ |
246 | 246 | ||
247 | }; | 247 | }; |
248 | } | 248 | } |
249 | 249 | ||
250 | #endif /* __OPKELE_BASIC_OP_H */ | 250 | #endif /* __OPKELE_BASIC_OP_H */ |