summaryrefslogtreecommitdiffabout
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2008-02-02moved uri matching into separate procedureMichael Krelin2-32/+33
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-02-02check if return_to matches realmMichael Krelin1-0/+36
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-02-02first rough cut on OP 2.0 implementationMichael Krelin2-1/+322
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-02-02added util::attr_escapeMichael Krelin1-0/+19
escaping string for inclusion into x(ht)ml attributes Signed-off-by: Michael Krelin <hacker@klever.net>
2008-02-02generate html form hiddens from the openid messageMichael Krelin1-0/+20
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-31added util::change_mode_message_proxy classMichael Krelin1-19/+2
generatlized checkauth_message_proxy and added it to util namespace. To be later used for constructing setup url in 1.0 checkid_immediate reply. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-30a few changes to the infrastructureMichael Krelin1-1/+18
* added mode_unknown to the mode_t enumeration * add to_keyvalues(ostream&) to openid message class * fixed openid_message_t::set_field for the case of overwriting Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-23check associate reply for consistencyMichael Krelin1-3/+6
Reject associate replies returning secret of inconsistent with association type length. This way severely broken OPs which return SHA1 association as SHA256 will still work in dumb mode. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-21Implement URI construction handling append='qxri' xrd:URI attribute.Michael Krelin1-7/+22
This is the right thing to do and may come in handy assisting OPs in improving UI. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-20the whole library rewrittenMichael Krelin12-167/+871
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-06Revert "discovery: stop parser with XML_StopParser()" for nowMichael Krelin1-6/+5
This reverts commit 7bde7f66284b47a75bbceadc360e7f03550ace21. because some older expat version do not support this function I don't want to make it conditional for now. Conflicts: lib/discovery.cc Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-06Fix non-debug tidying.Michael Krelin1-1/+1
somehow I've managed to put too many tidying options into conditional. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-05made more robust html discovery by using htmltidyMichael Krelin2-13/+66
now when parsing document that we expect might be html we also save first 16K of the document to the buffer and if the parser choked we run the saved data through htmltidy and feed the output to the parser again. Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-05added htmltidy dependencyMichael Krelin1-0/+6
- added libtidy detection to configure - added tidy flags to libopkele.pc.in - added primitive wrapper classes - added tidy exception class Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-05discovery: stop parser with XML_StopParser()Michael Krelin1-6/+12
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04output thrown exceptions to clog streamMichael Krelin1-0/+16
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04configurable -DNDEBUGMichael Krelin1-0/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04parse ProviderID while doing discoveryMichael Krelin1-0/+6
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04fix to rfc normalizationMichael Krelin1-1/+2
It kept prepending a '/' to the trailing segment even if the segment was past [?#] Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04xri discovery fills in canonicalized_id for xri identities nowMichael Krelin1-0/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04parse xrd:ExpiresMichael Krelin1-3/+7
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04adjust w3c_to_time output by timezone, so that it returns local timeMichael Krelin1-5/+15
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04corrected typoMichael Krelin1-1/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04fixed sreg namespace setting ('sreg.ns' to 'ns.sreg')Michael Krelin1-1/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04added openid.sreg.ns parameter to sreg extensionMichael Krelin1-0/+2
Signed-off-by: Michael Krelin <hacker@klever.net>
2008-01-04fix the xrds_location being cleared before it gets used.Michael Krelin1-1/+1
The xrds_location should not be cleared when doing pure xrd discovery. Otherwise it may get overwritten before curl actually uses it. Previously it was cleared twice, which is a waste of cpu cycles, anyway. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-17made secret_t non-constant size and added params_t::query_string functionMichael Krelin2-8/+17
1. removed checking that secret_t is exactly 20 bytes, because its size is not so constant anymore. 2. added a query_string function that produces a query string suitable for use in GET and POST requests. I'm making use of it when performing direct request when establishing associations. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-17moved curl_fetch_string_t/curl_pick_t classes into curl.hMichael Krelin1-19/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-15fixed handling of openid:Delegate in discoveryMichael Krelin1-1/+1
which was mistakenly added to the list of endpoint URIs instead of local ids. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-13keep track of whether the identity being discovered is XRIMichael Krelin1-0/+2
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-09Merge branch 'next' into devel/xriMichael Krelin2-6/+6
2007-12-09reworked identity resolution and service discoveryMichael Krelin4-309/+388
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>
2007-12-04Minor improvementsMichael Krelin1-3/+3
- almost irrelevant documentation updates - introduced id_res_expired_on_delivery exception to be thrown if the association has expired right before it could've been used for signature verification. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-04save a couple of ticks and make a bit more senseMichael Krelin1-3/+3
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-02more robust discoveryMichael Krelin1-7/+11
if no service found in yadis document, but it is found in html, use html-discovered service. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-12-02first cut on XRI resolverMichael Krelin3-5/+308
This commit adds openid service resolver that does discovery using XRI (proxy only), Yadis protocol and html-based discovery. It uses expat as xml parsing engine, which makes it a bit more strict about html it receives, but I think failing to discover links in *severely* broken html is better than misdetecting links, hidden in comments or such. This is highly experimental code and needs more thoughts and testing. Thanks everyone pushing me towards this development. Namely Joseph, John, Gen. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-28added a trivial expat wrapperMichael Krelin2-3/+100
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-28keep keeping compilers happyMichael Krelin1-1/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-28added header and progress callbacks to curl wrapperMichael Krelin1-0/+25
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-28removed meaningless conditionMichael Krelin1-1/+0
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-26encapsulated write functionality into curl_tMichael Krelin2-22/+40
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-24more curl wrapper cosmeticsMichael Krelin3-62/+88
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-24moved curl_t wrapper to util namespaceMichael Krelin1-20/+5
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-24added URI normalization procedure to opkele::utilMichael Krelin1-0/+131
as specified in RFC3896, section 6 Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21keep compiler happy about shadowed variableMichael Krelin1-1/+1
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21further calming compiler downMichael Krelin3-7/+7
Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21added some missing includes for gcc 4.3Michael Krelin3-0/+3
According to Marcus Rueckert gcc 4.3 wants these. Thanks, Marcus! Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21Fix exception constructionMichael Krelin1-9/+6
Thanks to Marcus Rueckert for pointing this out. Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21keep compiler happy and check more error conditionsMichael Krelin1-3/+4
Thanks Marcus Rueckert for pointing this out Signed-off-by: Michael Krelin <hacker@klever.net>
2007-11-21Keep compiler happyMichael Krelin1-2/+2
Thanks Marcus Rueckert for pointing this out. Signed-off-by: Michael Krelin <hacker@klever.net>