Change the authentication workflow. This will allow Sshwifty to run on a multi-node autobalanced cluster. After deploy this version, users might have to reload the frontend page before continue using Sshwifty.

This commit is contained in:
NI
2021-03-02 20:54:58 +08:00
parent 6001d6dd5e
commit c6683b1311
6 changed files with 264 additions and 198 deletions

View File

@@ -27,7 +27,7 @@ export async function hmac512(secret, data) {
secret,
{
name: "HMAC",
hash: { name: "SHA-512" }
hash: { name: "SHA-512" },
},
false,
["sign", "verify"]
@@ -50,7 +50,7 @@ export function buildGCMKey(keyData) {
keyData,
{
name: "AES-GCM",
length: GCMKeyBitLen
length: GCMKeyBitLen,
},
false,
["encrypt", "decrypt"]