Esempio n. 1
0
        protected virtual KerberosClient CreateClient(string configValue = null, bool verbose = false)
        {
            Krb5Config config;

            if (configValue != null)
            {
                config = Krb5Config.Parse(configValue);
            }
            else
            {
                config = Krb5Config.CurrentUser(this.ConfigurationPath);
            }

            ILoggerFactory logger = null;

            if (verbose)
            {
                logger = this.IO.CreateVerboseLogger(labels: true);
            }

            return(new KerberosClient(config, logger)
            {
                CacheInMemory = false
            });
        }
Esempio n. 2
0
        protected virtual KerberosClient CreateClient(string configValue = null, bool verbose = false)
        {
            Krb5Config config;

            if (!string.IsNullOrWhiteSpace(configValue))
            {
                config = Krb5Config.Parse(configValue);
            }
            else
            {
                config = Krb5Config.CurrentUser();
            }

            ILoggerFactory logger = null;

            if (verbose)
            {
                logger = this.CreateVerboseLogger();
            }

            return(new KerberosClient(config, logger)
            {
                CacheInMemory = false
            });
        }