Tweaked the SessionManager's IsSessionTokenValid function to accept a connection string to standardize the interfaces on all the SessionManager functions.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace SecureCore.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
if (SessionManager.IsSessionTokenValid(HttpContext))
|
||||
if (SessionManager.IsSessionTokenValid(HttpContext, connectionString))
|
||||
return Ok("Logged in\n");
|
||||
|
||||
//Verify that the username provided is valid, i.e. no whitespace, special characters, etc.
|
||||
@@ -168,7 +168,7 @@ namespace SecureCore.Controllers
|
||||
PasswordManager.InsertPasswordResetRequest(email, token, DateTime.Now.AddHours(1), agent, ip, connectionString);
|
||||
|
||||
token = HttpUtility.UrlEncode(token);
|
||||
//TODO: Allow the admin to configure the address that this function creates when doing password resets.
|
||||
//TODO: Email the link to the supplied email.
|
||||
return Ok($"192.168.255.200:5000/auth/ResetPassword?token={token}{Environment.NewLine}");
|
||||
}
|
||||
catch(Exception e)
|
||||
|
||||
Reference in New Issue
Block a user