Added API key authentication

This commit is contained in:
Mark McDowall 2013-09-20 00:31:02 -07:00
parent 689f27bee6
commit 57fdbe6e08
11 changed files with 114 additions and 15 deletions

View file

@ -26,6 +26,7 @@ namespace NzbDrone.Core.Configuration
string Password { get; }
string LogLevel { get; }
string Branch { get; }
string ApiKey { get; }
bool Torrent { get; }
}
@ -95,6 +96,14 @@ namespace NzbDrone.Core.Configuration
get { return GetValueBoolean("LaunchBrowser", true); }
}
public string ApiKey
{
get
{
return GetValue("ApiKey", Guid.NewGuid().ToString().Replace("-", ""));
}
}
public bool Torrent
{
get { return GetValueBoolean("Torrent", false, persist: false); }