diff options
| author | Max Nanis | 2026-09-10 01:00:39 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-09-10 01:00:39 -0700 |
| commit | 4dca7296742b607e74f16e2f6484c51163a41ace (patch) | |
| tree | 0839c16d0905deb587d3ee25ff93fd3ccf7eeeb6 /jb/api/auth.py | |
| parent | 832aecaddce80e312095ecdb572d7756eb9df5e9 (diff) | |
| download | amt-jb-4dca7296742b607e74f16e2f6484c51163a41ace.tar.gz amt-jb-4dca7296742b607e74f16e2f6484c51163a41ace.zip | |
using model_validator on GRLSettings. Allows null default values, then to asser them on load. Required so pydantic_settings can be loaded in tests without params
Diffstat (limited to 'jb/api/auth.py')
| -rw-r--r-- | jb/api/auth.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/jb/api/auth.py b/jb/api/auth.py index 411b8f1..1542e70 100644 --- a/jb/api/auth.py +++ b/jb/api/auth.py @@ -1,4 +1,3 @@ -import logging from datetime import datetime, timedelta, timezone from typing import Annotated from uuid import uuid4 @@ -13,7 +12,6 @@ from jb.managers.gr_api import GRApiManager from jb.models.auth import User bearer = HTTPBearer(auto_error=False) -logger = logging.getLogger(__name__) SESSION_COOKIE_NAME = "jb_session" JWT_ISSUER = "jamesbillings67" @@ -74,6 +72,7 @@ def get_authenticated_user( def create_session(product_user_id: str) -> str: now = datetime.now(timezone.utc) + assert settings.session_jwt_secret return jwt.encode( { "sub": product_user_id, |
