blob: cf72e24588ea3f01a5843ed1f2f4919ff60818db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
(in-package #:vampire)
(defclass user-known ()
((user :accessor user)))
(defmethod wknd:authenticate ((req user-known))
(or
(do>
key :when= (wknd:get-cookie +session-cookie+)
session :when= (object-with-key key)
:when (typep session 'session)
(setf (user req) (user session)))
(weekend:endpoint-redirect 'login.html)))
|