Add API key host enrollment endpoint (#1029)

This commit is contained in:
ZacharyZcR
2026-07-13 22:59:36 +08:00
committed by GitHub
parent 033dd38344
commit 1c18620629
5 changed files with 240 additions and 1 deletions
+2
View File
@@ -42,6 +42,7 @@ interface WrappedDataKey {
interface AuthenticatedRequest extends Request {
userId?: string;
sessionId?: string;
apiKeyId?: string;
pendingTOTP?: boolean;
dataKey?: Buffer;
}
@@ -881,6 +882,7 @@ class AuthManager {
});
req.userId = matchedKey.userId;
req.apiKeyId = matchedKey.id;
next();
} catch (error) {
databaseLogger.error("API key authentication failed", error, {