blob: 1c48c9a9b943609e108ce722f32d88184654e32c (
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)))
|