summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2008-02-12 23:37:05 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-12 23:37:05 (UTC)
commit2048be862b8619ddec90163af05e6472bf5175e4 (patch) (unidiff)
tree74ab3384a2a088abe5748ab93cd2f65fa121e1ae
parenta3eba4c33fee80fcf152dcbd198586e12b687e54 (diff)
downloadlibopkele-2048be862b8619ddec90163af05e6472bf5175e4.zip
libopkele-2048be862b8619ddec90163af05e6472bf5175e4.tar.gz
libopkele-2048be862b8619ddec90163af05e6472bf5175e4.tar.bz2
slight api improvement to ease caching of discovery information
* added opend_endpoint_output_iterator to types.h * changed endpoint_discovery_iterator to the aforementioned iterator typedef * added discover() virtual to prequeue_RP and made use thereof. Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/discovery.h3
-rw-r--r--include/opkele/prequeue_rp.h8
-rw-r--r--include/opkele/types.h3
-rw-r--r--lib/prequeue_rp.cc9
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
@@ -87,4 +87,3 @@ namespace opkele {
87 87
88 typedef util::output_iterator_proxy<openid_endpoint_t> 88 typedef openid_endpoint_output_iterator endpoint_discovery_iterator;
89 endpoint_discovery_iterator;
90 89
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
@@ -83,2 +83,10 @@ namespace opkele {
83 const string& claimed_id,const string& identity) const; 83 const string& claimed_id,const string& identity) const;
84
85 /**
86 * Perform full discovery on identity
87 * @param it iterator used for feeding discovered endpoints back to caller
88 * @param id user supplied identity
89 * @returns normalized identity (canonical identifier can be found in endpoints)
90 */
91 virtual const string discover(openid_endpoint_output_iterator it,const string& id) const;
84 }; 92 };
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
@@ -227,2 +227,5 @@ namespace opkele {
227 227
228 typedef util::output_iterator_proxy<openid_endpoint_t>
229 openid_endpoint_output_iterator;
230
228} 231}
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
@@ -46,3 +46,3 @@ namespace opkele {
46 try { 46 try {
47 idiscover(OP_verifier(OP,identity),claimed_id); 47 discover(OP_verifier(OP,identity),claimed_id);
48 throw id_res_unauthorized(OPKELE_CP_ 48 throw id_res_unauthorized(OPKELE_CP_
@@ -69,3 +69,3 @@ namespace opkele {
69 begin_queueing(); 69 begin_queueing();
70 set_normalized_id( idiscover(endpoint_queuer(*this),usi) ); 70 set_normalized_id( discover(endpoint_queuer(*this),usi) );
71 end_queueing(); 71 end_queueing();
@@ -80,2 +80,7 @@ namespace opkele {
80 80
81 const string prequeue_RP::discover(openid_endpoint_output_iterator it,
82 const string& id) const {
83 return idiscover(it,id);
84 }
85
81} 86}