Added Protection for the Twitch Secrets
This commit is contained in:
@@ -1,32 +1,28 @@
|
||||
using ABI.System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using TwitchDesktopNotifications.JsonStructure;
|
||||
using TwitchDesktopNotifications.JsonStructure.Helix;
|
||||
using Windows.ApplicationModel.Background;
|
||||
|
||||
namespace TwitchDesktopNotifications.Core
|
||||
{
|
||||
internal class TwitchFetcher
|
||||
{
|
||||
private TwitchFetcher() { }
|
||||
private TwitchFetcher() {
|
||||
var config = new ConfigurationBuilder().AddUserSecrets<Program>().Build();
|
||||
TwitchClientID = config["TwitchClientID"];
|
||||
TwitchClientSecret = config["TwitchClientSecret"];
|
||||
}
|
||||
|
||||
public static TwitchFetcher instance { get; private set; }
|
||||
|
||||
string TwitchClientID = ConfigurationManager.AppSettings["TwitchClientID"];
|
||||
string TwitchClientSecret = ConfigurationManager.AppSettings["TwitchClientSecret"];
|
||||
string TwitchClientID = "";
|
||||
string TwitchClientSecret = "";
|
||||
|
||||
List <StreamsData> currentlyLive = null;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
@@ -11,6 +11,7 @@
|
||||
<AssemblyName>Twitch Notify</AssemblyName>
|
||||
<UseWPF>True</UseWPF>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<UserSecretsId>2dfb7064-609b-41c3-a80d-a9e4d842a55d</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -18,6 +19,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="8.0.0-build.65" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user