summaryrefslogtreecommitdiffabout
path: root/src
Unidiff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rwxr-xr-xsrc/components/xriProtocolHandler.js28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/components/xriProtocolHandler.js b/src/components/xriProtocolHandler.js
index 1105874..3d27784 100755
--- a/src/components/xriProtocolHandler.js
+++ b/src/components/xriProtocolHandler.js
@@ -49,6 +49,9 @@ const XP_FIRST_ORDERED_NODE_TYPE = 9;
49var SERVICE_CLASSES = { 49var SERVICE_CLASSES = {
50 'xri://+i-service*(+contact)*($v*1.0)': 'i-contact', 50 'xri://+i-service*(+contact)*($v*1.0)': 'i-contact',
51 'http://openid.net/signon/1.0': 'openid', 51 'http://openid.net/signon/1.0': 'openid',
52 'http://openid.net/signon/1.1': 'openid',
53 'http://specs.openid.net/auth/2.0/signon': 'openid',
54 'http://specs.openid.net/auth/2.0/server': 'openid',
52 'xri://$res*auth*($v*2.0)': 'res-auth', 55 'xri://$res*auth*($v*2.0)': 'res-auth',
53 'xri://+i-service*(+authn)*(+saml)*($v*1.0)': 'authn-saml', 56 'xri://+i-service*(+authn)*(+saml)*($v*1.0)': 'authn-saml',
54 'xri://+i-service*(+metadata)*(+saml)*($v*1.0)' : 'metadata-saml', 57 'xri://+i-service*(+metadata)*(+saml)*($v*1.0)' : 'metadata-saml',
@@ -237,10 +240,11 @@ function renderService(srv, doc, qxri)
237 } 240 }
238 241
239 242
240 res = runExpr(doc, srv, "xrd:URI/text()"); 243 res = runExpr(doc, srv, "xrd:URI");
241 var u; 244 var uu;
242 while (u = res.iterateNext()) { 245 while (uu = res.iterateNext()) {
243 if (!u.nodeValue) 246 var u = uu.firstChild;
247 if (!(u.nodeValue && u.nodeType==3))
244 continue; 248 continue;
245 249
246 var srvType = guessServiceTypeByURI(u.nodeValue); 250 var srvType = guessServiceTypeByURI(u.nodeValue);
@@ -285,7 +289,14 @@ function renderService(srv, doc, qxri)
285 } 289 }
286 } 290 }
287 291
288 html_uris += "<a href=\""+u.nodeValue+"\">" 292 var linkhref = u.nodeValue;
293 var xrap = uu.getAttribute('append');
294 if(xrap=='qxri') {
295 linkhref += qxri.replace(/^xri:\/\//,'');
296 }else if(xrap!=null){
297 dump("Unhandled @append: "+xrap+"\n");
298 }
299 html_uris += "<a href=\""+linkhref+"\">"
289 + linkContent + "</a>"; 300 + linkContent + "</a>";
290 html_uris += "</div>"; 301 html_uris += "</div>";
291 } 302 }
@@ -392,7 +403,12 @@ function friendlyServiceName(srvType, uri)
392 if (srvType && srvType == "xri://+i-service*(+contact)*($v*1.0)") { 403 if (srvType && srvType == "xri://+i-service*(+contact)*($v*1.0)") {
393 return "Contact Service"; 404 return "Contact Service";
394 } 405 }
395 else if (srvType && srvType == "http://openid.net/signon/1.0") { 406 else if (srvType && (
407 srvType == "http://openid.net/signon/1.0"
408 || srvType == "http://openid.net/signon/1.1"
409 || srvType == "http://specs.openid.net/auth/2.0/signon"
410 || srcType == "http://specs.openid.net/auth/2.0/server"
411 ) ) {
396 return "OpenID Authentication Service"; 412 return "OpenID Authentication Service";
397 } 413 }
398 else if (srvType && srvType == "xri://$res*auth*($v*2.0)") { 414 else if (srvType && srvType == "xri://$res*auth*($v*2.0)") {