Aktueller Stand

This commit is contained in:
2026-01-23 01:33:35 +01:00
parent 082dc5e110
commit 2766dd12c5
10109 changed files with 1578841 additions and 77685 deletions

23
backend/node_modules/hono/dist/utils/basic-auth.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
// src/utils/basic-auth.ts
import { decodeBase64 } from "./encode.js";
var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/;
var USER_PASS_REGEXP = /^([^:]*):(.*)$/;
var utf8Decoder = new TextDecoder();
var auth = (req) => {
const match = CREDENTIALS_REGEXP.exec(req.headers.get("Authorization") || "");
if (!match) {
return void 0;
}
let userPass = void 0;
try {
userPass = USER_PASS_REGEXP.exec(utf8Decoder.decode(decodeBase64(match[1])));
} catch {
}
if (!userPass) {
return void 0;
}
return { username: userPass[1], password: userPass[2] };
};
export {
auth
};