Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00c23bc066 | |||
| 5f67cc9140 | |||
| a6375567b0 | |||
| 4c63166384 | |||
| 63316f1e92 | |||
| e0e170fe6a | |||
| 0f569f2c6e |
+3
-4
@@ -2,7 +2,7 @@
|
|||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from jose import JWTError, jwt
|
from jose import JWTError, jwt
|
||||||
from passlib.context import CryptContext
|
import bcrypt
|
||||||
from fastapi import Depends, HTTPException, status, Request
|
from fastapi import Depends, HTTPException, status, Request
|
||||||
from sqlalchemy.ext.asyncio import AsyncSession
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
@@ -12,17 +12,16 @@ from app.models.admin_user import AdminUser
|
|||||||
|
|
||||||
|
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
|
||||||
|
|
||||||
|
|
||||||
def verify_password(plain_password: str, hashed_password: str) -> bool:
|
def verify_password(plain_password: str, hashed_password: str) -> bool:
|
||||||
"""Verify a plain password against a hash."""
|
"""Verify a plain password against a hash."""
|
||||||
return pwd_context.verify(plain_password, hashed_password)
|
return bcrypt.checkpw(plain_password.encode(), hashed_password.encode())
|
||||||
|
|
||||||
|
|
||||||
def get_password_hash(password: str) -> str:
|
def get_password_hash(password: str) -> str:
|
||||||
"""Hash a password using bcrypt."""
|
"""Hash a password using bcrypt."""
|
||||||
return pwd_context.hash(password)
|
return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
|
||||||
|
|
||||||
|
|
||||||
def create_access_token(data: dict, expires_delta: timedelta | None = None) -> str:
|
def create_access_token(data: dict, expires_delta: timedelta | None = None) -> str:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* Brand Accent - used sparingly */
|
/* Brand Accent - used sparingly */
|
||||||
--color-accent: #EC6925;
|
--color-accent: #FA5C01;
|
||||||
--color-accent-hover: #d4581a;
|
--color-accent-hover: #d4581a;
|
||||||
--color-accent-light: rgba(236, 105, 37, 0.08);
|
--color-accent-light: rgba(236, 105, 37, 0.08);
|
||||||
--color-accent-border: rgba(236, 105, 37, 0.25);
|
--color-accent-border: rgba(236, 105, 37, 0.25);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* Brand Accent - used sparingly */
|
/* Brand Accent - used sparingly */
|
||||||
--color-accent: #EC6925;
|
--color-accent: #FA5C01;
|
||||||
--color-accent-hover: #d4581a;
|
--color-accent-hover: #d4581a;
|
||||||
--color-accent-light: rgba(236, 105, 37, 0.08);
|
--color-accent-light: rgba(236, 105, 37, 0.08);
|
||||||
--color-accent-border: rgba(236, 105, 37, 0.25);
|
--color-accent-border: rgba(236, 105, 37, 0.25);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg class="hms-logo-svg" viewBox="0 0 200 200" :style="`height:${size}px;width:auto`" aria-label="HMS Licht & Ton Logo" role="img">
|
<svg class="hms-logo-svg" viewBox="0 0 200 200" :style="`height:${size}px;width:auto`" aria-label="HMS Licht & Ton Logo" role="img">
|
||||||
<path fill="currentColor" d="M166.266,172.872h-37.687v-60.718H74.226v60.718H36.539V26.956h37.687v56.335h54.354V26.956h37.687V172.872z" />
|
<path fill="currentColor" d="M166.266,172.872h-37.687v-60.718H74.226v60.718H36.539V26.956h37.687v56.335h54.354V26.956h37.687V172.872z" />
|
||||||
<rect x="23.598" y="15.343" fill="none" stroke="#EC6925" stroke-width="15.1525" stroke-miterlimit="10" width="155.612" height="168.874" />
|
<rect x="23.598" y="15.343" fill="none" stroke="#FA5C01" stroke-width="15.1525" stroke-miterlimit="10" width="155.612" height="168.874" />
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default <Config>{
|
|||||||
text: "#ffffff",
|
text: "#ffffff",
|
||||||
"text-muted": "#d4d4d4",
|
"text-muted": "#d4d4d4",
|
||||||
accent: {
|
accent: {
|
||||||
DEFAULT: "#EC6925",
|
DEFAULT: "#FA5C01",
|
||||||
hover: "#d4581a",
|
hover: "#d4581a",
|
||||||
light: "rgba(236, 105, 37, 0.08)",
|
light: "rgba(236, 105, 37, 0.08)",
|
||||||
border: "rgba(236, 105, 37, 0.25)",
|
border: "rgba(236, 105, 37, 0.25)",
|
||||||
|
|||||||
Reference in New Issue
Block a user