예제 #1
0
        public static TokenOptions GetValidSettingsForTests()
        {
            IConfiguration config = new ConfigurationBuilder()
                                    .SetBasePath(Directory.GetCurrentDirectory())
                                    .AddJsonFile("appsettings.json")
                                    .Build();

            if (string.IsNullOrEmpty(config[Constants.ClientSecretName]))
            {
                config[Constants.ClientSecretName] = GetClientSecret();
            }

            var resolver = new DefaultNameResolver(config);

            var options = new TokenOptions();

            options.SetAppSettings(resolver);

            return(options);
        }