diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2025-04-25 00:54:15 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2025-04-25 00:54:15 +0100 |
| commit | 45a18c0ecb364c42307641b4057ff5a814e69b2e (patch) | |
| tree | 3ede8191b4b2ddb55df393d5b70d02977f4d8ea4 /authenticate.php | |
Version control
Diffstat (limited to 'authenticate.php')
| -rw-r--r-- | authenticate.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/authenticate.php b/authenticate.php new file mode 100644 index 0000000..7decfb5 --- /dev/null +++ b/authenticate.php @@ -0,0 +1,35 @@ +<?php +require_once('util.php'); +require_once('serviceDefinitions.php'); + +session_start(); + +$redirect = $_GET['redirect']; +$token = $_POST['token']; + +if (isset($_POST['token']) && $_POST['token'] === Util\getSuperSecretToken()) { + $_SESSION['token'] = $_POST['token']; + header('Location: ' . $redirect); + exit; +} +?> +<!DOCTYPE html> +<html> + +<head> + <title>Authenticate</title> + <link rel="stylesheet" type="text/css" href="styles.css"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> + +<body> + <div class="container"> + <h1>Authenticate</h1> + <hr> + <p>Please enter the secret key to continue.</p> + <form action="authenticate.php?redirect=<?php echo $redirect ?>" method="POST"> + Key: <input type="password" name="token"> + <input type="submit"> + </form> + </div> +</body> |
