1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-16 06:26:24 +02:00

feat: token authentication (#3927)

This commit is contained in:
Dag
2024-01-25 18:20:02 +01:00
committed by GitHub
parent d08d13f2c8
commit e58c867a82
13 changed files with 95 additions and 138 deletions

View File

@ -7,6 +7,8 @@
<title><?= e($_title ?? 'RSS-Bridge') ?></title>
<link href="static/style.css?2023-03-24" rel="stylesheet">
<link rel="icon" type="image/png" href="static/favicon.png">
<script src="static/rss-bridge.js"></script>
</head>
<body>

View File

@ -1,4 +1,4 @@
<script src="static/rss-bridge.js"></script>
<script>
document.addEventListener('DOMContentLoaded', rssbridge_toggle_bridge);
document.addEventListener('DOMContentLoaded', rssbridge_list_search);
@ -42,20 +42,6 @@
<?= $active_bridges ?>/<?= $total_bridges ?> active bridges.<br>
<?php if ($active_bridges !== $total_bridges): ?>
<?php if ($show_inactive): ?>
<a href="?show_inactive=0">
<button class="small">Hide inactive bridges</button>
</a>
<br>
<?php else: ?>
<a href="?show_inactive=1">
<button class="small">Show inactive bridges</button>
</a>
<br>
<?php endif; ?>
<?php endif; ?>
<br>
<?php if ($admin_email): ?>

20
templates/token.html.php Normal file
View File

@ -0,0 +1,20 @@
<?php
/**
* This template renders a form for user to enter a auth token if it's enabled
*/
?>
<h1>
Authentication with token required
</h1>
<p>
<?= e($message) ?>
</p>
<form action="" method="get">
<label for="token">Token:</label>
<input type="password" name="token" id="token" placeholder="token">
<input type="submit" value="OK">
</form>