author | Michael Krelin <hacker@klever.net> | 2008-02-04 22:39:59 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-02-04 22:39:59 (UTC) |
commit | 9163a26ec8839a31df888920418280a62ebc5595 (patch) (unidiff) | |
tree | 55339b4ecf0a3f24817eb5cc1b0b24f831ac895b /test | |
parent | c0eeee1cfd41d0f5f6ff6ac3d6fe021421376a69 (diff) | |
download | libopkele-9163a26ec8839a31df888920418280a62ebc5595.zip libopkele-9163a26ec8839a31df888920418280a62ebc5595.tar.gz libopkele-9163a26ec8839a31df888920418280a62ebc5595.tar.bz2 |
reworked extensions framework
* changed {checkid,id_res}_hook to {rp,op}_{checkid,id_res}_hook
* deprecated older hooks, although implemented it in sreg and chain extensions
* added extension processing to basic_op
* added sreg to test OP
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | test/OP.cc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -16,2 +16,3 @@ using namespace std; | |||
16 | #include <opkele/verify_op.h> | 16 | #include <opkele/verify_op.h> |
17 | #include <opkele/sreg.h> | ||
17 | 18 | ||
@@ -271,3 +272,4 @@ int main(int argc,char *argv[]) { | |||
271 | throw opkele::exception(OPKELE_CP_ "toying around, huh?"); | 272 | throw opkele::exception(OPKELE_CP_ "toying around, huh?"); |
272 | OP.checkid_(inm,0); | 273 | opkele::sreg_t sreg; |
274 | OP.checkid_(inm,sreg); | ||
273 | OP.cookie_header(cout); | 275 | OP.cookie_header(cout); |
@@ -280,5 +282,9 @@ int main(int argc,char *argv[]) { | |||
280 | } | 282 | } |
283 | sreg.set_field(opkele::sreg_t::field_nickname,"anonymous"); | ||
284 | sreg.set_field(opkele::sreg_t::field_fullname,"Ann O'Nymus"); | ||
285 | sreg.set_field(opkele::sreg_t::field_gender,"F"); | ||
286 | sreg.setup_response(); | ||
281 | cout << | 287 | cout << |
282 | "Status: 302 Going back to RP with id_res\n" | 288 | "Status: 302 Going back to RP with id_res\n" |
283 | "Location: " << OP.id_res(om).append_query(OP.get_return_to()) | 289 | "Location: " << OP.id_res(om,sreg).append_query(OP.get_return_to()) |
284 | << "\n\n"; | 290 | << "\n\n"; |