Files
hive/backend/app/core/auth.py
anthonyrawlins 268214d971 Major WHOOSH system refactoring and feature enhancements
- Migrated from HIVE branding to WHOOSH across all components
- Enhanced backend API with new services: AI models, BZZZ integration, templates, members
- Added comprehensive testing suite with security, performance, and integration tests
- Improved frontend with new components for project setup, AI models, and team management
- Updated MCP server implementation with WHOOSH-specific tools and resources
- Enhanced deployment configurations with production-ready Docker setups
- Added comprehensive documentation and setup guides
- Implemented age encryption service and UCXL integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 08:34:48 +10:00

14 lines
541 B
Python

from fastapi import Depends, HTTPException, status
from fastapi.security import HTTPBearer
from typing import Optional
security = HTTPBearer(auto_error=False)
async def get_current_user(token: Optional[str] = Depends(security)):
"""Simple auth placeholder - in production this would validate JWT tokens"""
if not token:
# For now, allow anonymous access
return {"id": "anonymous", "username": "anonymous"}
# In production, validate the JWT token here
return {"id": "user123", "username": "whoosh_user"}