user admin

This commit is contained in:
2026-08-27 15:57:48 +02:00
parent 84891adb89
commit ffd077bb4d
15 changed files with 765 additions and 24 deletions
+20 -1
View File
@@ -3,7 +3,8 @@
@(require (for-label racket/base
racket/contract
rkt-web-player
rkt-web-player/player-agent))
rkt-web-player/player-agent
rkt-web-player/users))
@title{RKT Web Player}
@author{Hans van Dijkema}
@@ -19,6 +20,10 @@ browser by Racket's web server.
[music-paths (listof (or/c path-string?
(list/c string? path-string?)))]
[#:allowed-agent-ids allowed-agent-ids (listof string?) null]
[#:users users (listof (cons/c string? string?)) null]
[#:local-networks local-networks (listof string?)]
[#:trusted-proxies trusted-proxies (listof string?)]
[#:session-seconds session-seconds exact-positive-integer? 43200]
[#:listen-ip listen-ip string? "127.0.0.1"]
[#:port port exact-positive-integer? 8080]
[#:dlna-port dlna-port exact-positive-integer? 8734]
@@ -40,6 +45,20 @@ The default listen address only exposes the interface to the local computer.
Use a LAN address deliberately if other devices should control the player.
}
@defmodule[rkt-web-player/users]
@defproc[(make-password-hash [password string?]) string?] {
Creates a salted Argon2id password hash suitable for a value in the INI
@tt{[users]} section. Passwords must contain at least twelve characters.
}
@defproc[(password-hash-valid? [password string?]
[encoded string?]) boolean?] {
Checks a password against an encoded Argon2id hash.
}
@defmodule[rkt-web-player/player-agent]
@defproc[(run-player-agent) any/c] {