aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Controllers
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-22 16:48:26 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-22 16:48:26 -0600
commitfc9a1aacfb9c4e005fd482ba37394840865e9e61 (patch)
treecc6101ad7014f1c504fea1e5118e6b47435bf51a /src/slskd/Controllers
parent0210ab449f7546a90982a8cb28403f3d6af02230 (diff)
downloadslskd-fc9a1aacfb9c4e005fd482ba37394840865e9e61.tar.gz
wip
Diffstat (limited to 'src/slskd/Controllers')
-rw-r--r--src/slskd/Controllers/SessionController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Controllers/SessionController.cs b/src/slskd/Controllers/SessionController.cs
index df523b75..d41a9295 100644
--- a/src/slskd/Controllers/SessionController.cs
+++ b/src/slskd/Controllers/SessionController.cs
@@ -46,7 +46,7 @@
[ProducesResponseType(typeof(bool), 200)]
public IActionResult Enabled()
{
- return Ok(!Program.DisableAuthentication);
+ return Ok(!InstanceOptions.DisableAuthentication);
}
/// <summary>
@@ -83,7 +83,7 @@
[ProducesResponseType(400)]
[ProducesResponseType(401)]
[ProducesResponseType(typeof(string), 500)]
- public IActionResult Login([FromBody]LoginRequest login)
+ public IActionResult Login([FromBody] LoginRequest login)
{
if (login == default)
{
@@ -115,7 +115,7 @@
private JwtSecurityToken GetJwtSecurityToken(string username, Role role)
{
var issuedUtc = DateTime.UtcNow;
- var expiresUtc = DateTime.UtcNow.AddMilliseconds(Program.JwtTTL);
+ var expiresUtc = DateTime.UtcNow.AddMilliseconds(InstanceOptions.JwtTTL);
var claims = new List<Claim>()
{