-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 = { 'http://openid.net/signon/1.0': 'openid',
+ 'http://openid.net/signon/1.1': 'openid',
+ 'http://specs.openid.net/auth/2.0/signon': 'openid',
+ 'http://specs.openid.net/auth/2.0/server': 'openid',
'xri://$res*auth*($v*2.0)': 'res-auth',
@@ -239,6 +242,7 @@ function renderService(srv, doc, qxri) - res = runExpr(doc, srv, "xrd:URI/text()");
- var u;
- while (u = res.iterateNext()) {
- if (!u.nodeValue)
+ res = runExpr(doc, srv, "xrd:URI");
+ var uu;
+ while (uu = res.iterateNext()) {
+ var u = uu.firstChild;
+ if (!(u.nodeValue && u.nodeType==3))
continue;
@@ -287,3 +291,10 @@ function renderService(srv, doc, qxri) - html_uris += "<a href=\""+u.nodeValue+"\">"
+ var linkhref = u.nodeValue;
+ var xrap = uu.getAttribute('append');
+ if(xrap=='qxri') {
+ linkhref += qxri.replace(/^xri:\/\//,'');
+ }else if(xrap!=null){
+ dump("Unhandled @append: "+xrap+"\n");
+ }
+ html_uris += "<a href=\""+linkhref+"\">"
+ linkContent + "</a>";
@@ -394,3 +405,8 @@ function friendlyServiceName(srvType, uri) }
- else if (srvType && srvType == "http://openid.net/signon/1.0") {
+ else if (srvType && (
+ srvType == "http://openid.net/signon/1.0"
+ || srvType == "http://openid.net/signon/1.1"
+ || srvType == "http://specs.openid.net/auth/2.0/signon"
+ || srcType == "http://specs.openid.net/auth/2.0/server"
+ ) ) {
return "OpenID Authentication Service";
|