From b77478d56788ac6f57e9c0b50d0f3bfc86b8e94e Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 13 Apr 2021 17:33:40 -0500 Subject: [PATCH] Login should be done. Added application key for JWT signing --- .env.example | 14 ++- src/app/components/CheckBox.vue | 6 +- src/app/components/TextBox.vue | 2 - src/app/views/Login.vue | 47 +++++++-- src/app/views/Register.vue | 12 +-- src/common/validation.ts | 98 +++++++++++-------- src/server/Application.ts | 10 +- src/server/index.ts | 8 +- src/server/services/WebServer/index.ts | 2 +- .../WebServer/requests/LoginRequest.ts | 22 +++++ .../WebServer/requests/RegisterRequest.ts | 10 +- src/server/services/WebServer/routes/auth.ts | 19 +++- 12 files changed, 181 insertions(+), 69 deletions(-) create mode 100644 src/server/services/WebServer/requests/LoginRequest.ts diff --git a/.env.example b/.env.example index 10358c1..8db03d8 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,7 @@ +# Application key to sign stuff +APP_KEY_FILE = /run/secrets/app_key + +# Database credentials DB_TYPE = mysql DB_HOST = database DB_PORT = 3306 @@ -5,7 +9,13 @@ DB_USER = root DB_PASSWORD_FILE = /run/secrets/mysql_root_password DB_DATABASE = autoplex_request -SERVER_PORT = 3200 +# Interfaces --------------------------------------------------------------------------------------- + +# Torrent client IPC socket path TORRENT_CLIENT_IPC_SOCKET = /tmp/torrent_client.sock -DISCORD_BOT_TOKEN= +# Web server port +WEBSERVER_PORT = 3200 + +# Discord bot token +DISCORD_BOT_TOKEN = diff --git a/src/app/components/CheckBox.vue b/src/app/components/CheckBox.vue index fd77724..304eb92 100644 --- a/src/app/components/CheckBox.vue +++ b/src/app/components/CheckBox.vue @@ -1,6 +1,6 @@