pass AesProvider to session
This commit is contained in:
parent
2a9f1bc244
commit
5f69b25950
1 changed files with 6 additions and 3 deletions
|
@ -7,18 +7,21 @@ using Microsoft.Extensions.Configuration;
|
|||
|
||||
public class AuthorizationServer : NetCoreServer.TcpServer
|
||||
{
|
||||
[Inject] private readonly ILogger _logger;
|
||||
private readonly AesProvider _aesProvider;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public AuthorizationServer(IConfiguration configuration, ILoggerFactory loggerFactory) : base(
|
||||
public AuthorizationServer(IConfiguration configuration, ILoggerFactory loggerFactory, AesProvider aesProvider) : base(
|
||||
configuration["auth:address"]!,
|
||||
configuration.GetValue<int>("auth:port"))
|
||||
{
|
||||
_aesProvider = aesProvider;
|
||||
_logger = loggerFactory.CreateLogger(nameof(AuthorizationServer));
|
||||
}
|
||||
|
||||
protected override NetCoreServer.TcpSession CreateSession()
|
||||
{
|
||||
return null;
|
||||
var session = new AuthorizationServerSession(this, _logger, _aesProvider);
|
||||
return session;
|
||||
}
|
||||
|
||||
protected override void OnStarting()
|
||||
|
|
Loading…
Reference in a new issue