feat(auth): add token authentication with SHA-256 hashed storage

This commit is contained in:
2026-03-29 15:54:41 +04:00
parent 6a540eaf81
commit 6f6b7552fc
6 changed files with 187 additions and 13 deletions
+5 -1
View File
@@ -11,7 +11,8 @@ _cp.read_dict({
"server": {
"port": "3001", "dir": str(Path.home() / "Downloads" / "shared"),
"ttl": "7", "san": "", "lang": "ru", "refresh": "5",
"per_page": "10,25,50,100",
"per_page": "10,25,50,100", "token": "",
"cert": "", "key": "",
},
"internal": {
"secs_per_day": "86400", "cleanup_interval": "3600",
@@ -42,6 +43,9 @@ def load_config() -> dict:
p.add_argument("--san", nargs="*")
p.add_argument("--lang")
p.add_argument("--refresh", type=int)
p.add_argument("--token")
p.add_argument("--cert", help="Path to SSL certificate file")
p.add_argument("--key", help="Path to SSL key file")
args = p.parse_args()
for key, val in vars(args).items():