Files
iptv-manager-service/app/routers/playlist.py

16 lines
576 B
Python

from fastapi import APIRouter, Depends
from app.auth.dependencies import get_current_user
from app.models.auth import CognitoUser
router = APIRouter(prefix="/playlist", tags=["playlist"])
@router.get("/protected", summary="Protected endpoint for authenticated users")
async def protected_route(user: CognitoUser = Depends(get_current_user)):
"""
Protected endpoint that requires authentication for all users.
If the user is authenticated, returns success message.
"""
return {"message": f"Hello {user.username}, you have access to support resources!"}