   [usernames expiration]
   (and (not (empty? usernames)) (java-time/before? expiration (java-time/instant))))
 
-(defn- extend
+(defn- extend-session
   [session]
   (log/info :msg session)
   (assoc session :expiration (java-time/plus (java-time/instant) (java-time/seconds (Integer/parseInt (:subticket-session-length-in-seconds env))))))

;      ^:interceptors [(body-params/body-params) http/html-body]
;      ["/about" {:get about-page}]]]])

(def ^:private key (DatatypeConverter/parseHexBinary (:subticket-secret-key env)))
;; Consumed by subticket.server/create-server
;; See http/default-interceptors for additional options you can configure
(def service {:env :prod

              ;; Root for resource interceptor that is available by default.
              ::http/resource-path "/public"
              ;; session as encrypted cookie
              ::http/enable-session {:store (cookie/cookie-store {:key session-key :readers clojure.core/*data-readers*})}

              ;; Either :jetty, :immutant or :tomcat (see comments in project.clj)
              ::http/type :jetty
