public virtual void AuthSucceeded(HttpHost authhost, AuthScheme authScheme, HttpContext
                                          context)
        {
            Args.NotNull(authhost, "Host");
            Args.NotNull(authScheme, "Auth scheme");
            Args.NotNull(context, "HTTP context");
            HttpClientContext clientContext = ((HttpClientContext)HttpClientContext.Adapt(context
                                                                                          ));

            if (IsCachable(authScheme))
            {
                AuthCache authCache = clientContext.GetAuthCache();
                if (authCache == null)
                {
                    authCache = new BasicAuthCache();
                    clientContext.SetAuthCache(authCache);
                }
                if (this.log.IsDebugEnabled())
                {
                    this.log.Debug("Caching '" + authScheme.GetSchemeName() + "' auth scheme for " +
                                   authhost);
                }
                authCache.Put(authhost, authScheme);
            }
        }