diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-01-22 16:48:26 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-01-22 16:48:26 -0600 |
| commit | fc9a1aacfb9c4e005fd482ba37394840865e9e61 (patch) | |
| tree | cc6101ad7014f1c504fea1e5118e6b47435bf51a /src/slskd/Controllers | |
| parent | 0210ab449f7546a90982a8cb28403f3d6af02230 (diff) | |
| download | slskd-fc9a1aacfb9c4e005fd482ba37394840865e9e61.tar.gz | |
wip
Diffstat (limited to 'src/slskd/Controllers')
| -rw-r--r-- | src/slskd/Controllers/SessionController.cs | 6 |
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>() { |
