Use new allowEveryoneAuthorizer instead of defining openAuthorizer
ourselves.
MultiPart: 2/2
Change-Id: I5a0277f2b96622760b6a3e628322c204dea8494b
diff --git a/clients/web/js/channel.js b/clients/web/js/channel.js
index 181cb61..0ae1c94 100644
--- a/clients/web/js/channel.js
+++ b/clients/web/js/channel.js
@@ -10,7 +10,7 @@
var path = require('path');
var url = require('url');
-var access = require('vanadium/src/gen-vdl/v.io/v23/security/access');
+var access = require('vanadium/src/security/access');
var naming = require('vanadium').naming;
var noop = require('./noop');
var ServiceVdl = require('./v.io/x/chat/vdl');
@@ -85,9 +85,8 @@
});
};
- // openAuthorizer allows RPCs from all clients.
- var openAuthorizer = function(ctx, secCall, cb){ cb(null); };
- var options = {authorizer: openAuthorizer};
+ // allowEveryoneAuthorizer allows RPCs from all clients.
+ var options = {authorizer: access.allowEveryoneAuthorizer()};
var that = this;
diff --git a/clients/web/js/v.io/x/chat/vdl/index.js b/clients/web/js/v.io/x/chat/vdl/index.js
index 2d58831..7c9dca9 100644
--- a/clients/web/js/v.io/x/chat/vdl/index.js
+++ b/clients/web/js/v.io/x/chat/vdl/index.js
@@ -32,11 +32,11 @@
function Chat(){}
-module.exports.Chat = Chat
+module.exports.Chat = Chat;
-Chat.prototype.sendMessage = function(ctx, text) {
+Chat.prototype.sendMessage = function(ctx, serverCall, text) {
throw new Error('Method SendMessage not implemented');
};
@@ -56,7 +56,7 @@
inArgs: [{
name: 'text',
doc: "",
- type: vdl.Types.STRING
+ type: vdl.types.STRING
},
],
outArgs: [],