server.modules.auth.auth
Ensures users' authentication
get-agents
(get-agents house-id & {:keys [admin user controller], :or {admin false, user false, controller false}})
Public agent DB functions
get-controllers
(get-controllers obj house-id _)
Get the controllers associated to the agent's house-id
get-users
(get-users obj house-id _)
Get the users associated to the admin's house-id
login
(login obj house-id _)
Log in agent and sets a cookie in the response. If some agent is already
logged in, this handler returns 400 and does nothing with the session.
logout
(logout obj house-id _)
Logs user out, sets session to nil
new-admin
(new-admin obj _ _)
Create new admin associated with a new house-id
new-user
(new-user obj house-id _)
Create new user agent, associated with the agent's house-id
register-controller
(register-controller obj house-id _)
Associate a controller with the admin's house-id
set-token
(set-token obj house-id _)
Change a token to a new value