Auth system: - Copy auth.py from stegasoo, adapt DB path to ~/.soosef/auth/soosef.db - Add setup/login/logout/recover/account routes - Add admin user management routes (users, create, delete, reset) - Full RBAC: admin_required and login_required decorators working Stego routes (mounted directly in app.py): - Generate credentials with QR code support - Encode/decode/tools placeholder pages (full route migration is Phase 1b) - Channel status API, capacity comparison API, download API Support modules (copied verbatim from stegasoo): - subprocess_stego.py: crash-safe subprocess isolation - stego_worker.py: worker script for subprocess - temp_storage.py: file-based temp storage with auto-expiry - ssl_utils.py: self-signed cert generation Templates and JS: - All stegasoo templates copied to stego/ subdirectory - Auth templates (login, setup, account, recover) at root - Admin templates (users, settings) - JS files: soosef.js (renamed from stegasoo.js), auth.js, generate.js Verified: full login flow works (setup → login → authenticated routes) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
56 lines
2.2 KiB
HTML
56 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Login - Stegasoo{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-5 col-lg-4">
|
|
<div class="card">
|
|
<div class="card-header text-center">
|
|
<i class="bi bi-shield-lock fs-1 d-block mb-2"></i>
|
|
<h5 class="mb-0">Login</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ url_for('login') }}">
|
|
<div class="mb-3">
|
|
<label class="form-label">
|
|
<i class="bi bi-person me-1"></i> Username
|
|
</label>
|
|
<input type="text" name="username" class="form-control"
|
|
placeholder="Enter your username" required autofocus>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label class="form-label">
|
|
<i class="bi bi-key me-1"></i> Password
|
|
</label>
|
|
<div class="input-group">
|
|
<input type="password" name="password" class="form-control"
|
|
id="passwordInput" required>
|
|
<button class="btn btn-outline-secondary" type="button"
|
|
onclick="togglePassword('passwordInput', this)">
|
|
<i class="bi bi-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary w-100">
|
|
<i class="bi bi-box-arrow-in-right me-2"></i>Login
|
|
</button>
|
|
</form>
|
|
|
|
<div class="text-center mt-3">
|
|
<a href="{{ url_for('recover') }}" class="text-muted small">
|
|
<i class="bi bi-key me-1"></i> Forgot password?
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='js/auth.js') }}"></script>
|
|
{% endblock %}
|