-rw-r--r-- | lib/consumer.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/consumer.cc b/lib/consumer.cc index bb6358c..10c2fa0 100644 --- a/lib/consumer.cc +++ b/lib/consumer.cc @@ -125,9 +125,9 @@ namespace opkele { - string consumer_t::checkid_immediate(const string& identity,const string& return_to,const string& trust_root) { - return checkid_(mode_checkid_immediate,identity,return_to,trust_root); + string consumer_t::checkid_immediate(const string& identity,const string& return_to,const string& trust_root,extension_t *ext) { + return checkid_(mode_checkid_immediate,identity,return_to,trust_root,ext); } - string consumer_t::checkid_setup(const string& identity,const string& return_to,const string& trust_root) { - return checkid_(mode_checkid_setup,identity,return_to,trust_root); + string consumer_t::checkid_setup(const string& identity,const string& return_to,const string& trust_root,extension_t *ext) { + return checkid_(mode_checkid_setup,identity,return_to,trust_root,ext); } - string consumer_t::checkid_(mode_t mode,const string& identity,const string& return_to,const string& trust_root) { + string consumer_t::checkid_(mode_t mode,const string& identity,const string& return_to,const string& trust_root,extension_t *ext) { params_t p; @@ -155,2 +155,3 @@ namespace opkele { }catch(exception& e) { } + if(ext) ext->checkid_hook(p,identity); return p.append_query(server); @@ -158,3 +159,3 @@ namespace opkele { - void consumer_t::id_res(const params_t& pin,const string& identity) { + void consumer_t::id_res(const params_t& pin,const string& identity,extension_t *ext) { if(pin.has_param("openid.user_setup_url")) @@ -163,2 +164,3 @@ namespace opkele { retrieve_links(identity.empty()?pin.get_param("openid.identity"):canonicalize(identity),server,delegate); + params_t ps; try { @@ -182,2 +184,3 @@ namespace opkele { kv += '\n'; + if(ext) ps[f.substr(sizeof("openid."))] = pin.get_param(f); if(co==string::npos) @@ -221,2 +224,3 @@ namespace opkele { } + if(ext) ext->id_res_hook(pin,ps,identity); } |