vumichien's picture
token store
6830bc7
raw
history blame contribute delete
558 Bytes
from fastapi import APIRouter, Depends
from custom_auth import get_current_user_from_token
router = APIRouter()
@router.get("/health")
async def health_check():
"""
Check if the API is running
"""
return {"status": "healthy"}
@router.get("/auth-check")
async def auth_check(current_user=Depends(get_current_user_from_token)):
"""
Debug endpoint to verify authentication is working
"""
return {
"authenticated": True,
"username": current_user.username,
"message": "Authentication successful",
}