Structs§
Functions§
- accept_
invite - Accept an invite - set password and clear invite token
- authenticate
- Authenticate a user and return them if successful
- change_
password - Change password
- create
- Create a new user (admin only)
- create_
session - Create a new session for a user
- create_
with_ invite - Create a new user with an invite token (no password yet)
- delete
- Delete a user (admin only, cannot delete self)
- delete_
expired_ sessions - Delete expired sessions (cleanup)
- delete_
session - Delete a session (logout)
- ensure_
default_ admin - Create the default admin user if no users exist
- find
- Find user by ID
- find_
by_ invite_ token - Find user by invite token
- generate_
invite_ token - Generate an invite token (12 bytes = 24 hex chars, short but secure)
- get_
user_ from_ session - Get user from session token
- hash_
password - Hash a password using Argon2
- list_
all - List all users (admin only)
- verify_
password - Verify a password against a hash