feat(auth): add token authentication with SHA-256 hashed storage
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user