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()); }
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); } }