summaryrefslogtreecommitdiff
path: root/service/logout-service.lisp
blob: d7ab412e8c23c260853baf19c39b58f3abd00be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(declaim (optimize (speed 0) (safety 3) (debug 3)))

(in-package #:ldapadmin)

(defclass logout-service (rest-service)
  ((location-p :initform nil))
  (:documentation ""))

(defun logout-json ()
  (with-noauth (instance logout-service)
    (setf (session-value :permissions) "anonymous")
    (setf (location instance) "/home")
    (setf (message instance) "You are now logged out.")))