ef72e221be
Implemented a comprehensive authentication system requiring all users to be logged in to access the web interface. Features include: Backend: - JWT-based authentication with 7-day token expiration - bcrypt password hashing with 72-byte limit handling - User management with JSON file storage (config/users.json) - Pydantic models for validation (UserCreate, UserLogin, User, Token) - Authentication endpoints: register, login, me, logout - Protected route dependency with HTTPBearer security Frontend: - Login/register page with dual-tab interface (/login) - Client-side authentication check with automatic redirect - All content hidden by default, shown only after auth validation - User info display with logout button - Main content and tabs hidden when not authenticated - Auto-redirect to /login if token missing or invalid Security: - Password truncation to 72 bytes (bcrypt limitation) - Token verification on each page load - Automatic logout and redirect on token expiry - Username-to-SHA256 user ID generation Dependencies: - passlib[bcrypt]==1.7.4 - python-jose[cryptography]==3.3.0 - bcrypt<4.0 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
29 lines
1020 B
HTML
29 lines
1020 B
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Ohm Stream Downloader</title>
|
|
|
|
<!-- CSS -->
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
|
|
<!-- JavaScript -->
|
|
<script src="/static/js/auth.js?v=1.9" defer></script>
|
|
<script src="/static/js/api.js?v=1.9" defer></script>
|
|
<script src="/static/js/utils.js?v=1.9" defer></script>
|
|
<script src="/static/js/downloads.js?v=1.9" defer></script>
|
|
<script src="/static/js/anime.js?v=1.9" defer></script>
|
|
<script src="/static/js/anime-details.js?v=1.9" defer></script>
|
|
<script src="/static/js/series-search.js?v=1.9" defer></script>
|
|
<script src="/static/js/recommendations.js?v=1.9" defer></script>
|
|
<script src="/static/js/tabs.js?v=1.9" defer></script>
|
|
<script src="/static/js/main.js?v=1.9" defer></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html>
|