The dev.v.io identity provider will now issue "dev.v.io/u/<email>/..."
blessings instead of "dev.v.io/root/users/<email>/..."
Change-Id: I6199d7260a876d6ee6a571f439b2fab8ef07bca5
diff --git a/browser/services/pipe-to-browser-namespace.js b/browser/services/pipe-to-browser-namespace.js
index 24c2f2a..652915c 100644
--- a/browser/services/pipe-to-browser-namespace.js
+++ b/browser/services/pipe-to-browser-namespace.js
@@ -23,7 +23,7 @@
var ctx = runtime.getContext().withTimeout(5000);
ctx.waitUntilDone(function(){});
- var nsPrefix = runtime.accountName.replace('dev.v.io/root/', '');
+ var nsPrefix = runtime.accountName.replace('dev.v.io/u/', 'users/');
var globPattern = vanadium.naming.join(nsPrefix, 'p2b/*');
var globResult = namespace.glob(ctx, globPattern);
var p2bServices = [];
diff --git a/browser/services/pipe-to-browser-server.js b/browser/services/pipe-to-browser-server.js
index 12f8554..09cfaa9 100644
--- a/browser/services/pipe-to-browser-server.js
+++ b/browser/services/pipe-to-browser-server.js
@@ -139,9 +139,10 @@
return vanadium.init().then((runtime) => {
server = runtime.newServer();
- // we want to publish under users/email/ so we remove the dev dev.v.io/root/
- // from the account name.
- var nsPrefix = runtime.accountName.replace('dev.v.io/root/', '');
+ // the blessing name for the account is dev.v.io.io/u/<email>/<something>.
+ // the object name we want to publish under is users/<email>/<something>/p2b/<name>.
+ // So, replace "dev.v.io/u/" with "users/".
+ var nsPrefix = runtime.accountName.replace('dev.v.io/u/', 'users/');
var serviceName = vanadium.naming.join(nsPrefix, 'p2b', name);
return server.serveDispatcher(serviceName, dispatcher).then(() => {