public void SetResponseChecker(string clientId, CheckResponseProcessor processor)
        {
            var old = _clientList.FirstOrDefault(c => c.ClientID == clientId);

            if (old != null)
            {
                old.ResponseChecker = processor;
            }
        }
 public ClientCertificateManager(
     ClientCertificateInfo client,
     CertificateProcessor processor,
     SetTokenProcessor tokenSetter,
     CheckResponseProcessor responseChecker,
     TokenCacheManager cacheManager,
     ILogger <ClientCertificateManager> logger,
     IHttpClientFactory clientFactory)
 {
     Client           = client;
     _processor       = processor;
     _tokenSetter     = tokenSetter;
     _responseChecker = responseChecker;
     _cacheManager    = cacheManager;
     _clientFactory   = clientFactory;
     _logger          = logger;
 }
 public ClientItem SetResponseChecker(CheckResponseProcessor processor)
 {
     ResponseChecker = processor;
     return(this);
 }
        public ClientItem AddClient(string url, string clientId, string clientSecret, string clientName = "", CertificateProcessor processor = null, Func <IServiceProvider, string, TokenCacheManager> tokenManagerFactory = null, SetTokenProcessor tokenSetter = null, CheckResponseProcessor responseChecker = null)
        {
            var old = _clientList.FirstOrDefault(c => c.ClientID == clientId);

            if (old == null)
            {
                old = new ClientItem();
                _clientList.Add(old);
            }

            old.ClientID          = clientId;
            old.ClientSecret      = clientSecret;
            old.AuthUrl           = url;
            old.ClientName        = clientName;
            old.Processor         = processor;
            old.TokenCacheManager = tokenManagerFactory;
            old.TokenSetter       = tokenSetter;
            old.ResponseChecker   = responseChecker;

            return(old);
        }
 public ClientItem SetResponseChecker(Func <HttpResponseMessage, Task> processor)
 {
     ResponseChecker = Xfrogcn.AspNetCore.Extensions.CheckResponseProcessor.CreateDelegateCheckResponseProcessor(processor);
     return(this);
 }