author | Michael Krelin <hacker@klever.net> | 2007-12-09 17:22:06 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-12-09 22:08:24 (UTC) |
commit | c34adc6e274c3dbb63af99ca566000e7d218244c (patch) (unidiff) | |
tree | 705624c208deb4eaf8d07c119a883e6f4f35236e /test/openid_resolve.cc | |
parent | 60fdaff7888b455b4d07eadc905cefd20f1ddd3c (diff) | |
download | libopkele-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>
-rw-r--r-- | test/openid_resolve.cc | 36 |
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 @@ | |||
1 | #include <iostream> | ||
2 | #include <stdexcept> | ||
3 | #include <iterator> | ||
4 | #include <algorithm> | ||
5 | using namespace std; | ||
6 | #include <opkele/exception.h> | ||
7 | #include <opkele/openid_service_resolver.h> | ||
8 | |||
9 | int main(int argc,char **argv) { | ||
10 | try { | ||
11 | if(argc<2) | ||
12 | throw opkele::exception(OPKELE_CP_ "Please, give me something to resolve"); | ||
13 | opkele::openid_service_resolver_t resolver; | ||
14 | for(int a=1;a<argc;++a) { | ||
15 | const opkele::openid_auth_info_t& iai = resolver.resolve(argv[a]); | ||
16 | clog | ||
17 | << "====================" << endl | ||
18 | << "canonical id is " << iai.canonical_id << endl | ||
19 | << endl | ||
20 | << "service priority is " << iai.auth_SEP.priority << endl | ||
21 | << "service types are " ; | ||
22 | copy( | ||
23 | iai.auth_SEP.xrd_Type.begin(), iai.auth_SEP.xrd_Type.end(), | ||
24 | ostream_iterator<string>(clog," ") ); | ||
25 | clog << endl | ||
26 | << "service URI is " << iai.auth_SEP.xrd_URI << endl; | ||
27 | if(!iai.auth_SEP.openid_Delegate.empty()) | ||
28 | clog << "openid:Delegate is " << iai.auth_SEP.openid_Delegate << endl; | ||
29 | clog << endl; | ||
30 | } | ||
31 | }catch(exception& e) { | ||
32 | cerr << "oops: " << e.what() << endl; | ||
33 | _exit(1); | ||
34 | } | ||
35 | _exit(0); | ||
36 | } | ||