Beispiel #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;
        }
Beispiel #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;
        }