🐛 maybe_authenticated with export

This commit is contained in:
Brian Wiborg 2025-10-11 01:20:32 +02:00
parent d7f7db338f
commit cf106e8855
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,7 @@
from .routes import (
get_current_user,
get_token,
maybe_authenticated,
require_admin,
require_authenticated,
require_group,

View file

@ -124,7 +124,7 @@ async def get_current_user(token: str = Depends(oauth2_scheme)) -> User:
return user
async def optionally_authenticated(token: Optional[str] = Depends(oauth2_scheme)) -> Optional[User]:
async def maybe_authenticated(token: Optional[str] = Depends(oauth2_scheme)) -> Optional[User]:
if token is None:
return None
return await get_current_user(token)