Updated the Login code so it responds with a set-cookie header for the session token. Still looking into if this is the right thing to do however.

This commit is contained in:
2021-01-03 02:36:36 -06:00
parent e8454fb652
commit 26ea8e8cbc
28 changed files with 31 additions and 7037 deletions
+4 -4
View File
@@ -12,13 +12,13 @@ namespace SecureCore
private static int SaltSize { get; } = 128 / 8; //128 bit salt
private static int SessionKeySize { get; } = 32; //32 bytes
public static string CreateSessionId()
public static string CreateSessionToken()
{
var sessionId = new byte[SessionKeySize];
var token = new byte[SessionKeySize];
GetRandomBytes(ref sessionId);
GetRandomBytes(ref token);
return Convert.ToBase64String(sessionId);
return Convert.ToBase64String(token);
}
public static (string Hash, string Salt) HashPassword(string password)