public SignalRClientService( ILogger <SignalRClientService> logger, IApplicationLifetime applicationLifetime, IAuthService authService, IAccountService accountService, IAccountMQPublisher accountMQPublisher, IOptions <SecuritySettings> securityOptions) { this.accountService = accountService; this.authService = authService; this.logger = logger; this.securitySettings = securityOptions.Value; this.appLifetime = applicationLifetime; this.accountMQPublisher = accountMQPublisher; // Setup SignalR Hub connection string accessToken = JWTokenHandler.GenerateToken(securitySettings.ClientIdentifier, securitySettings.Secret); hubConnectionAuth = new HubConnectionBuilder() .WithUrl("https://localhost:44380/authhub", options => options.AccessTokenProvider = () => Task.FromResult <string>(accessToken)) .Build(); hubConnectionAccount = new HubConnectionBuilder() .WithUrl("https://localhost:44380/accounthub", options => options.AccessTokenProvider = () => Task.FromResult <string>(accessToken)) .Build(); }
public AuthHubClientService(IOptions <GatewayBaseSettings> gatewayBaseOptions, IOptions <SecuritySettings> securityOptions, IAccountService accountService, IAuthService authService, IAccountMQPublisher accountMQPublisher, ILogger <AuthHubClientService> logger) : base(gatewayBaseOptions, securityOptions, HUB_ENDPOINT) { this.logger = logger; this.accountMQPublisher = accountMQPublisher; this.authService = authService; this.accountService = accountService; }