-rwxr-xr-x | src/components/xriProtocolHandler.js | 28 |
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 | |||
@@ -51,2 +51,5 @@ var SERVICE_CLASSES = { | |||
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', |
@@ -239,6 +242,7 @@ function renderService(srv, doc, qxri) | |||
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; |
@@ -287,3 +291,10 @@ function renderService(srv, doc, qxri) | |||
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>"; |
@@ -394,3 +405,8 @@ function friendlyServiceName(srvType, uri) | |||
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"; |