1 ;;; basic-authentication.el --- basic authentication
2 ;; Copyright (C) 2014 Free Software Foundation, Inc.
4 (lexical-let ((users '(("foo" . "bar")
7 (ws-with-authentication
9 (with-slots (process headers) request
10 (let ((user (caddr (assoc :AUTHORIZATION headers))))
11 (ws-response-header process 200 '("Content-type" . "text/plain"))
12 (process-send-string process (format "welcome %s" user)))))