Ejemplo n.º 1
0
        public MsalClientFactory(IOptionsSnapshot <MsalOptions> config, ITokenCacheAccessor tokenCacheAccessor, ILoggerFactory loggerFactory)
        {
            _log = loggerFactory.CreateLogger <MsalClientFactory>();
            _log.LogDebug($"Entering MsalClientFactory without certificate");

            _config             = config.Get("Commercial");
            _chinaConfig        = config.Get("China");
            _tokenCacheAccessor = tokenCacheAccessor;
        }
Ejemplo n.º 2
0
        public MsalClientFactory(IOptionsSnapshot <MsalOptions> config, ITokenCacheAccessor tokenCacheAccessor, X509Certificate2 cert, ILoggerFactory loggerFactory)
        {
            _log = loggerFactory.CreateLogger <MsalClientFactory>();
            _log.LogDebug($"Entering MsalClientFactory with injected certificate {cert.Subject}, {cert.Thumbprint}");

            _config             = config.Get("Commercial");
            _chinaConfig        = config.Get("China");
            _config.Certificate = cert;
            _tokenCacheAccessor = tokenCacheAccessor;
        }