-rw-r--r-- | include/opkele/discovery.h | 3 | ||||
-rw-r--r-- | include/opkele/prequeue_rp.h | 8 | ||||
-rw-r--r-- | include/opkele/types.h | 3 | ||||
-rw-r--r-- | lib/prequeue_rp.cc | 9 |
4 files changed, 19 insertions, 4 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h index 4471597..f2721a6 100644 --- a/include/opkele/discovery.h +++ b/include/opkele/discovery.h @@ -85,8 +85,7 @@ namespace opkele { } - typedef util::output_iterator_proxy<openid_endpoint_t> - endpoint_discovery_iterator; + typedef openid_endpoint_output_iterator endpoint_discovery_iterator; string idiscover( endpoint_discovery_iterator oi, diff --git a/include/opkele/prequeue_rp.h b/include/opkele/prequeue_rp.h index 68fe03d..6f1fda9 100644 --- a/include/opkele/prequeue_rp.h +++ b/include/opkele/prequeue_rp.h @@ -81,6 +81,14 @@ namespace opkele { void verify_OP(const string& OP, const string& claimed_id,const string& identity) const; + + /** + * Perform full discovery on identity + * @param it iterator used for feeding discovered endpoints back to caller + * @param id user supplied identity + * @returns normalized identity (canonical identifier can be found in endpoints) + */ + virtual const string discover(openid_endpoint_output_iterator it,const string& id) const; }; } diff --git a/include/opkele/types.h b/include/opkele/types.h index 1f48362..1fab869 100644 --- a/include/opkele/types.h +++ b/include/opkele/types.h @@ -225,6 +225,9 @@ namespace opkele { ? (c<0) : (strcmp(local_id.c_str(),x.local_id.c_str())<0); } }; + typedef util::output_iterator_proxy<openid_endpoint_t> + openid_endpoint_output_iterator; + } #endif /* __OPKELE_TYPES_H */ diff --git a/lib/prequeue_rp.cc b/lib/prequeue_rp.cc index 3aa960f..ed1ddfe 100644 --- a/lib/prequeue_rp.cc +++ b/lib/prequeue_rp.cc @@ -44,7 +44,7 @@ namespace opkele { void prequeue_RP::verify_OP(const string& OP,const string& claimed_id,const string& identity) const { try { - idiscover(OP_verifier(OP,identity),claimed_id); + discover(OP_verifier(OP,identity),claimed_id); throw id_res_unauthorized(OPKELE_CP_ "OP is not authorized to make an assertion regarding the identity"); }catch(__OP_verifier_good_input& ovgi) { @@ -67,7 +67,7 @@ namespace opkele { void prequeue_RP::initiate(const string& usi) { begin_queueing(); - set_normalized_id( idiscover(endpoint_queuer(*this),usi) ); + set_normalized_id( discover(endpoint_queuer(*this),usi) ); end_queueing(); } @@ -78,4 +78,9 @@ namespace opkele { throw not_implemented(OPKELE_CP_ "get_normalized_id() is not implemented"); } + const string prequeue_RP::discover(openid_endpoint_output_iterator it, + const string& id) const { + return idiscover(it,id); + } + } |