// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { Configuration.LoadPrefixValues( "HS_", "../../apiconfig.json;../../secrets/apiconfig-secrets.json"); _Config = services.AddPrefixConfig <HsConfig>(); services .AddUsingDescriptor <StreamingManager>() .AddUsingDescriptor <MailNotifications>() .AddUsingDescriptor <NotificationsManager>(); services .AddControllers() .AddNewtonsoftJson(o => { o.SerializerSettings.ContractResolver = new DefaultContractResolver(); o.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; }); }
public static void VerifyUtilAuth(this HsConfig config, string key) { VerifyUtilAuth(config?.UtilAuthKey, key); }
public static void VerifyClientToken(this HsConfig config, string clientToken) { VerifyClientToken(config?.ClientToken, clientToken); }