예제 #1
0
 public TlsConfiguration(IApplicationLifetime lifetime, ILogger <TlsConfiguration> logger, IOptions <StartupOptions> startupOptions, IOptions <SecurityOptions> securityOptions)
 {
     _lifetime        = lifetime;
     _logger          = logger;
     _startupOptions  = startupOptions.Value;
     _securityOptions = securityOptions.Value;
 }
예제 #2
0
 public static X509Certificate2 GetCertificateForEncryption(SecurityOptions securityOptions)
 {
     if (string.IsNullOrWhiteSpace(securityOptions.X509CertificateFile))
     {
         var certName = securityOptions.X509CertificateName ?? Invariant($"CN={Environment.MachineName}");
         return(FindCertificate(certName));
     }
     else
     {
         if (securityOptions.X509CertificatePassword != null)
         {
             return(new X509Certificate2(securityOptions.X509CertificateFile, securityOptions.X509CertificatePassword));
         }
         else
         {
             return(new X509Certificate2(securityOptions.X509CertificateFile));
         }
     }
 }
예제 #3
0
 public SecurityManager(IAuthenticationService authenticationService, IOptions <SecurityOptions> options)
 {
     _authenticationService = authenticationService;
     _options = options.Value;
 }
예제 #4
0
 public SecurityManager(UserProfileManager userProfileManager, IOptions <SecurityOptions> options, ILogger <SecurityManager> logger)
 {
     _userProfileManager = userProfileManager;
     _options            = options.Value;
     _logger             = logger;
 }
예제 #5
0
 public TlsConfiguration(ILogger logger, SecurityOptions options) {
     _logger = logger;
     _securityOptions = options;
 }
예제 #6
0
 public TlsConfiguration(ILogger logger, SecurityOptions options)
 {
     _logger          = logger;
     _securityOptions = options;
 }
예제 #7
0
 public SecurityManager(UserProfileManager userProfileManager, IOptions<SecurityOptions> options, ILogger<SecurityManager> logger) {
     _userProfileManager = userProfileManager;
     _options = options.Value;
     _logger = logger;
 }
예제 #8
0
 public SecurityManager(IOptions <SecurityOptions> options, ILogger <SecurityManager> logger)
 {
     _options = options.Value;
     _logger  = logger;
 }
예제 #9
0
 public TlsConfiguration(ILogger <TlsConfiguration> logger, SecurityOptions securityOptions)
 {
     _logger          = logger;
     _securityOptions = securityOptions;
 }