Exemple #1
0
 public void CallAction(string accessToken, string hubGroupId, string payloadString)
 {
     Logger.LogInformation($"SignalRHub.CallAction groupId=[{hubGroupId}] payload=[{payloadString}]");
     ApplicationUser appUser    = this.GetUserFromAccessToken(accessToken);
     HubPayload      hubPayload = JsonConvert.DeserializeObject <HubPayload>(payloadString);
     // await _appDataManager.CallAction(this, appUser, hubGroupId, hubPayload);
 }
Exemple #2
0
        public async Task CallAction(string accessToken, string hubGroupId, string payloadString)
        {
            Logger.LogInformation($"SignalRHub.CallAction groupId=[{hubGroupId}] payload=[{payloadString}]");
            var             handler = new JwtSecurityTokenHandler();
            var             token   = handler.ReadJwtToken(accessToken);
            ApplicationUser appUser = await UserManager.FindByIdAsync(token.Subject);

            HubPayload hubPayload = JsonConvert.DeserializeObject <HubPayload>(payloadString);

            await _hubGroupManager.CallAction(this, appUser, hubGroupId, hubPayload);
        }