示例#1
0
        private bool AuthenticateAndUpdateUser(IUser user, string tableName)
        {
            List <string> tableNames = user.AuthenticatedChannels;

            tableNames.Add(tableName);
            string       userToken = user.Token;
            BrokerResult result    = AuthUser(tableNames, userToken);

            if (result.ok())
            {
                user.AuthenticatedChannels.Add(tableName);
            }
            return(result.ok());
        }
示例#2
0
        public BrokerResult CreateAuthAndInvite(Guid eventID, IUser eventCreator, IEnumerable <IUser> invitees)
        {
            string       tableName   = EIDToEtableName(eventID);
            BrokerResult creationRes = CreateEventChannel(eventID, eventCreator);

            if (creationRes.ok())
            {
                return(InviteUsers(invitees, eventCreator.Name, tableName));
            }
            else
            {
                return(creationRes);
            }
        }