feat: several improvements to azlux's token auth scheme #154

1. 'auth_method' in config, where users can select between
   'password' and 'token'.
2. create index for token, avoid iterating the entire user
   section when validating tokens.
3. only generate token for a user when there's no token for
   him in the db, avoid tokens fill the db.
This commit is contained in:
Terry Geng
2020-05-18 10:17:08 +08:00
parent 4017e7bff0
commit edf5495fe5
5 changed files with 64 additions and 69 deletions

View File

@ -928,6 +928,7 @@ function uploadNextFile(){
form.append('targetdir', uploadTargetDir.value);
req.open('POST', 'upload');
req.withCredentials = true;
req.send(form);
file_progress_item.progress.classList.add("progress-bar-striped");