cl-scopes/lib/auth/web.lisp

21 lines
666 B
Common Lisp

;;;; cl-scopes/lib/auth/web - authentication web interface
(defpackage :scopes-auth/web
(:use :common-lisp)
(:local-nicknames (:auth :scopes-auth)
(:config :scopes/config)
(:core :scopes/core)
(:jwt :scopes/web/jwt)
(:server :scopes/web/server)
(:shape :scopes/shape)
(:util :scopes/util))
(:export #:login))
(in-package :scopes-auth/web)
(defun login (ctx msg)
(let* ((prc (auth:login (shape:data msg))))
;(jwt:create ...)
;(server:set-cookie ctx ...)
;(core:echo ctx ...) ; render htmx response
(core:echo ctx msg)))