mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Fixed uuid references in schemas.
Some checks are pending
Node.js CI / build (postgresql, 18.18) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18) (push) Waiting to run
This commit is contained in:
parent
f40e1b44f3
commit
303947fe9b
16 changed files with 36 additions and 27 deletions
|
|
@ -19,8 +19,14 @@ export function checkPassword(password: string, passwordHash: string) {
|
|||
return bcrypt.compareSync(password, passwordHash);
|
||||
}
|
||||
|
||||
export function getBearerToken(request: Request) {
|
||||
const auth = request.headers.get('authorization');
|
||||
|
||||
return auth?.split(' ')[1];
|
||||
}
|
||||
|
||||
export async function checkAuth(request: Request) {
|
||||
const token = request.headers.get('authorization')?.split(' ')?.[1];
|
||||
const token = getBearerToken(request);
|
||||
const payload = parseSecureToken(token, secret());
|
||||
const shareToken = await parseShareToken(request.headers);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue