1 ;;; basic-authentication.el --- basic authentication
2 (lexical-let ((users '(("foo" . "bar")
5 (ws-with-authentication
7 (with-slots (process headers) request
8 (let ((user (caddr (assoc :AUTHORIZATION headers))))
9 (ws-response-header process 200 '("Content-type" . "text/plain"))
10 (process-send-string process (format "welcome %s" user)))))