Website Summary Files Commits Branches @commit @diff @stats
path: root / views / profile / authenticate.php
diff options
context:
space:
mode:
1 files changed, 0 insertions, 24 deletions
-rw-r--r--views/profile/authenticate.php24
diff --git a/views/profile/authenticate.php b/views/profile/authenticate.php
deleted file mode 100644
index e4cf47e..0000000
--- a/views/profile/authenticate.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
- header('Allow: POST');
- http_response_code(405);
- header('Content-Type: text/plain');
- echo $_SERVER['REQUEST_METHOD'] . " request not allowed!";
- exit;
-}
-
-try {
- $user = Database\Cookie::fromDB($TOKEN);
-
- http_response_code(200);
- header('Content-Type: text/plain');
- echo $user->Username;
-}
-catch(Exception $e) {
- http_response_code(401);
- header('Content-Type: text/plain');
- echo 'Bad token!';
-}
-
-exit;