diff options
author | Tim <contact@bytim.eu> | 2025-04-27 13:44:11 +0200 |
---|---|---|
committer | Tim <contact@bytim.eu> | 2025-04-27 13:44:11 +0200 |
commit | b83e7b9fda92379e30a2b1097eb3945171ae02e1 (patch) | |
tree | 498d717773f3723a3a890549690c0aeb5c30eed8 /VPNAuth.Server | |
parent | 076b193b1714383e83d8aa80253cddfd1d695b92 (diff) | |
download | VPNAuth-b83e7b9fda92379e30a2b1097eb3945171ae02e1.tar.xz VPNAuth-b83e7b9fda92379e30a2b1097eb3945171ae02e1.zip |
Set actual value to expires_in field in access token response
Diffstat (limited to 'VPNAuth.Server')
-rw-r--r-- | VPNAuth.Server/Api/OAuth2.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/VPNAuth.Server/Api/OAuth2.cs b/VPNAuth.Server/Api/OAuth2.cs index bed5110..b73b17b 100644 --- a/VPNAuth.Server/Api/OAuth2.cs +++ b/VPNAuth.Server/Api/OAuth2.cs @@ -65,7 +65,7 @@ public static class OAuth2 using var db = new Database.Database(); var authRequest = db.AuthRequests - .Where(request => request.Code == context.Request.Form["code"].ToString()) + .Where(request => request.Code == context.Request.Form["code"]) .ToList() .FirstOrDefault(); if (authRequest == null) @@ -104,7 +104,7 @@ public static class OAuth2 { AccessToken = accessTokenEntry.Entity.Token, TokenType = "Bearer", - Expires = 0 // TODO: change to actual value + ExpiresIn = 604800 // 7 days }); } } |