beherbergung/backend/src/beherbergung/model/login.clj
Johannes Lötzsch 7e8daca015 backend: template (from swlkup)
TODO:
* debug why http://localhost:4000/graphiql/index.html doesn't load
* adapt tests from swlkup
* adapt flake from swlkup and test build pipeline
2022-03-06 23:09:59 +01:00

21 lines
571 B
Clojure

(ns beherbergung.model.login
(:require [clojure.spec.alpha :as s]
[specialist-server.type :as t]))
(s/def ::mail t/string) ;; Used as login-name
(s/def ::password-hash t/string)
(s/def ::invited-by t/string)
(s/def ::record (s/keys :req-un [::mail ::password-hash] :opt-un [::invited-by]))
(s/def ::login (s/keys :req-un [::mail ::password-hash]))
(s/def ::login:id t/string)
(s/def ::password t/string) ;; The unhashed password is not part of the login schema
(s/def ::login:ids (s/or :1 ::login:id
:* (s/* ::login:id)))