public void Call(IWampClient client, string callId, string procUri, params TMessage[] arguments)
        {
            string resolvedUri = ResolveUri(client, procUri);
            WampCraAuthenticator <TMessage> wampAuth = GetOrCreateWampAuthenticatorForClient(client);

            WampRpcPermissions rpcPerm = wampAuth.CraPermissionsMapper.LookupRpcPermissions(resolvedUri);

            if (rpcPerm != null && rpcPerm.call)
            {
                mRpcServer.Call(client, callId, resolvedUri, arguments);
            }
            else
            {
                client.CallError(callId, "http://api.wamp.ws/error#not_authorized", "No permissions");
            }
        }
Exemple #2
0
 public void AddRpcPermission(WampRpcPermissions rpcPermission)
 {
     mRpcPermissions[rpcPermission.uri] = rpcPermission;
 }