summaryrefslogtreecommitdiffabout
path: root/test/openid_resolve.cc
authorMichael Krelin <hacker@klever.net>2007-12-09 17:22:06 (UTC)
committer Michael Krelin <hacker@klever.net>2007-12-09 22:08:24 (UTC)
commitc34adc6e274c3dbb63af99ca566000e7d218244c (patch) (side-by-side diff)
tree705624c208deb4eaf8d07c119a883e6f4f35236e /test/openid_resolve.cc
parent60fdaff7888b455b4d07eadc905cefd20f1ddd3c (diff)
downloadlibopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.zip
libopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.tar.gz
libopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.tar.bz2
reworked identity resolution and service discovery
The discovery, which does both XRDS-based (Yadis, XRI, for XRI, using proxy) and HTML-based search, now returns results in opkele:idiscovery_t structure. It uses expat-based parser idigger_t, which itself is not exposed via any header files, but hidden in lib/discovery.cc, the discovery testing program is renamed from openid_resolve to idiscover. Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'test/openid_resolve.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--test/openid_resolve.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/test/openid_resolve.cc b/test/openid_resolve.cc
deleted file mode 100644
index 31c7a6a..0000000
--- a/test/openid_resolve.cc
+++ b/dev/null
@@ -1,36 +0,0 @@
-#include <iostream>
-#include <stdexcept>
-#include <iterator>
-#include <algorithm>
-using namespace std;
-#include <opkele/exception.h>
-#include <opkele/openid_service_resolver.h>
-
-int main(int argc,char **argv) {
- try {
- if(argc<2)
- throw opkele::exception(OPKELE_CP_ "Please, give me something to resolve");
- opkele::openid_service_resolver_t resolver;
- for(int a=1;a<argc;++a) {
- const opkele::openid_auth_info_t& iai = resolver.resolve(argv[a]);
- clog
- << "====================" << endl
- << "canonical id is " << iai.canonical_id << endl
- << endl
- << "service priority is " << iai.auth_SEP.priority << endl
- << "service types are " ;
- copy(
- iai.auth_SEP.xrd_Type.begin(), iai.auth_SEP.xrd_Type.end(),
- ostream_iterator<string>(clog," ") );
- clog << endl
- << "service URI is " << iai.auth_SEP.xrd_URI << endl;
- if(!iai.auth_SEP.openid_Delegate.empty())
- clog << "openid:Delegate is " << iai.auth_SEP.openid_Delegate << endl;
- clog << endl;
- }
- }catch(exception& e) {
- cerr << "oops: " << e.what() << endl;
- _exit(1);
- }
- _exit(0);
-}