Closed bwindels closed 5 years ago
add static-website feature as we need some form of authentication to allow file upload for uploading static assets.
needs a http handlers as well that can be used as middleware, like so:
let auth_handler = app::BasicAuthHandler(child_handler, |username, password| {
username == "foo" && password == "bar"
});
Maybe not for the initial version, but would be good to think if we want to look up the username and password in something that needs to perform an async action, what the api should look like.
Using https://gist.github.com/bwindels/777a1b5b13cd54bcd67dca3c925ca7bb as a base64 decoder, parse the authorization header into an Authorization enum, of which
Basic
contains a struct with username and password.