aboutsummaryrefslogtreecommitdiffstats
path: root/authentication/utils.py
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.io>2026-09-04 17:09:24 +0200
committerGravatar Tom van der Lee <tom@vanderlee.io>2026-09-04 17:09:24 +0200
commit6b6f20a032eb31d747366c8bc270ca81731eaf6a (patch)
treeada48080495267bebde4ee1251bbbe77d629745f /authentication/utils.py
parent2d22158dd95f76399f5716d556be60c77da04a46 (diff)
downloadserver-6b6f20a032eb31d747366c8bc270ca81731eaf6a.tar.gz
server-6b6f20a032eb31d747366c8bc270ca81731eaf6a.tar.bz2
server-6b6f20a032eb31d747366c8bc270ca81731eaf6a.zip
Fixed pre-commit issuesv3
Diffstat (limited to 'authentication/utils.py')
-rw-r--r--authentication/utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/authentication/utils.py b/authentication/utils.py
index 4f19bc3..b0c9989 100644
--- a/authentication/utils.py
+++ b/authentication/utils.py
@@ -15,11 +15,11 @@ def bcrypt_sha256_hash(password: str) -> str:
15def bcrypt_sha256_verify(password: str, hashed: str) -> bool: 15def bcrypt_sha256_verify(password: str, hashed: str) -> bool:
16 digest = hashlib.sha256(password.encode("utf-8")).digest() 16 digest = hashlib.sha256(password.encode("utf-8")).digest()
17 encoded = base64.b64encode(digest) 17 encoded = base64.b64encode(digest)
18 return bcrypt.checkpw(encoded, hashed.encode('utf-8')) 18 return bcrypt.checkpw(encoded, hashed.encode("utf-8"))
19 19
20 20
21def get_url_path_with_query(app: FastAPI, name: str, params: dict | None = None, /, **path_params: str): 21def get_url_path_with_query(
22 app: FastAPI, name: str, params: dict | None = None, /, **path_params: str
23):
22 base = app.url_path_for(name, **path_params) 24 base = app.url_path_for(name, **path_params)
23 return base + '?' + urlencode(params) if params is not None else base 25 return base + "?" + urlencode(params) if params is not None else base
24
25