HTTP routing and handlers for user module - provides structured route definitions.
This namespace implements the REST API and Web UI for user and session management.
The module exports routes in a structured format {:api [...] :web [...] :static [...]} for composition by the top-level router, which applies appropriate prefixes:
API Endpoints (mounted under /api):
Web UI Endpoints (mounted under /web):
Static Assets (mounted at root):
All observability is handled automatically by interceptors.
HTTP routing and handlers for user module - provides structured route definitions.
This namespace implements the REST API and Web UI for user and session management.
Route Structure:
----------------
The module exports routes in a structured format {:api [...] :web [...] :static [...]}
for composition by the top-level router, which applies appropriate prefixes:
API Endpoints (mounted under /api):
- POST /api/users - Create user
- GET /api/users/:id - Get user by ID
- GET /api/users - List users (with filters)
- PUT /api/users/:id - Update user
- DELETE /api/users/:id - Soft delete user
- POST /api/sessions - Create session (login)
- GET /api/sessions/:token - Validate session
- DELETE /api/sessions/:token - Invalidate session (logout)
- POST /api/auth/login - Authenticate with email/password
Web UI Endpoints (mounted under /web):
- GET /web/users - Users listing page
- GET /web/users/new - Create user page
- GET /web/users/:id - Redirect to /web/admin/users/:id
- POST /web/users - Create user (HTMX fragment)
Static Assets (mounted at root):
- GET /css/* - CSS assets
- GET /js/* - JavaScript assets
- GET /modules/* - Module-specific assets
- GET /docs/* - Documentation
All observability is handled automatically by interceptors.(api-routes user-service mfa-service)The module's API routes, as Reitit data.
Paths are relative: the platform mounts them under /api/v1.
The module's API routes, as Reitit data. Paths are relative: the platform mounts them under /api/v1.
(create-interceptor-context operation-type user-service request)Creates interceptor context with real observability services and error mappings.
Creates interceptor context with real observability services and error mappings.
(create-session-handler user-service)POST /api/sessions - Create session using interceptor pipeline.
POST /api/sessions - Create session using interceptor pipeline.
(create-user-handler user-service)Create a new user using interceptor pipeline.
This version demonstrates the interceptor-based approach that eliminates manual observability boilerplate while providing comprehensive tracking.
Create a new user using interceptor pipeline. This version demonstrates the interceptor-based approach that eliminates manual observability boilerplate while providing comprehensive tracking.
(delete-user-handler user-service)DELETE /api/users/:id - Delete user using interceptor pipeline.
DELETE /api/users/:id - Delete user using interceptor pipeline.
(export-own-data-handler data-export)The signed-in user's own data export (GDPR Art. 20).
The signed-in user's own data export (GDPR Art. 20).
(export-routes {:keys [user-service data-export audit-repository export-jobs
config]})Data export: a user's own at GET /api/v1/me/export and /web/profile/export,
anyone's for an admin at GET /api/v1/users/:id/export, and with
:export-jobs (privacy/IExportJobs) as a background job at
POST /api/v1/users/:id/export-jobs.
Data export: a user's own at GET /api/v1/me/export and /web/profile/export, anyone's for an admin at GET /api/v1/users/:id/export, and with `:export-jobs` (privacy/IExportJobs) as a background job at POST /api/v1/users/:id/export-jobs.
(export-user-data-handler data-export audit-repository)An admin's export of any user's data, for a request made another way. Recorded in the user's audit trail.
An admin's export of any user's data, for a request made another way. Recorded in the user's audit trail.
(get-user-handler user-service)GET /api/users/:id - Get user by ID using interceptor pipeline.
GET /api/users/:id - Get user by ID using interceptor pipeline.
(group-routes user-service group-service config)Groups, roles and permissions, mounted under /web/admin beside the admin UI, and a user's rights at /web/users/:id/rights, /explain and /grant: admins only. Absent when the web UI is switched off.
Groups, roles and permissions, mounted under /web/admin beside the admin UI, and a user's rights at /web/users/:id/rights, /explain and /grant: admins only. Absent when the web UI is switched off.
(invalidate-session-handler user-service)DELETE /api/sessions/:token - Invalidate session using interceptor pipeline.
DELETE /api/sessions/:token - Invalidate session using interceptor pipeline.
(list-users-handler user-service)GET /api/users - List users using interceptor pipeline.
GET /api/users - List users using interceptor pipeline.
(login-handler user-service)POST /auth/login - Authenticate user with email/password using interceptor pipeline.
POST /auth/login - Authenticate user with email/password using interceptor pipeline.
(mfa-disable-handler mfa-service)POST /api/auth/mfa/disable - Disable MFA for the authenticated user, who
confirms with password or a current TOTP or backup code.
POST /api/auth/mfa/disable - Disable MFA for the authenticated user, who confirms with `password` or a current TOTP or backup `code`.
(mfa-enable-handler mfa-service)POST /api/auth/mfa/enable - Enable MFA after verification.
POST /api/auth/mfa/enable - Enable MFA after verification.
(mfa-setup-handler mfa-service)POST /api/auth/mfa/setup - Initiate MFA setup for authenticated user.
POST /api/auth/mfa/setup - Initiate MFA setup for authenticated user.
(mfa-status-handler mfa-service)GET /api/auth/mfa/status - Get MFA status for authenticated user.
GET /api/auth/mfa/status - Get MFA status for authenticated user.
This module's sidebar group: the admin's users, the profile and its admin pages.
This module's sidebar group: the admin's users, the profile and its admin pages.
(oidc-routes oidc-client config)OpenID Connect sign-in, mounted under /web. Public: the provider's redirect arrives before a session exists, and the sealed cookie is what ties each step to the one before.
OpenID Connect sign-in, mounted under /web. Public: the provider's redirect arrives before a session exists, and the sealed cookie is what ties each step to the one before.
(request-user-export-job-handler user-service export-jobs audit-repository)An admin's export of any user's data as a background job, downloaded from the job's status endpoint. Recorded in the user's audit trail when asked for: that is where the actor and their request are.
An admin's export of any user's data as a background job, downloaded from the job's status endpoint. Recorded in the user's audit trail when asked for: that is where the actor and their request are.
(update-user-handler user-service)PUT /api/users/:id - Update user using interceptor pipeline.
PUT /api/users/:id - Update user using interceptor pipeline.
User module specific error type -> HTTP status mappings.
User module specific error type -> HTTP status mappings.
(user-routes user-service mfa-service config)This module's contribution to the application's route table.
:api versioned, mounted under /api/v1
:web mounted under /web, and absent when the web UI is switched off
:static / when :landing is set; user's assets are served at handler level
:nav its sidebar group, with the web UI
This module's contribution to the application's route table. :api versioned, mounted under /api/v1 :web mounted under /web, and absent when the web UI is switched off :static `/` when `:landing` is set; user's assets are served at handler level :nav its sidebar group, with the web UI
(validate-session-handler user-service)GET /api/sessions/:token - Validate session using interceptor pipeline.
GET /api/sessions/:token - Validate session using interceptor pipeline.
(web-routes user-service mfa-service config)The module's web UI routes, as Reitit data.
Without the /web prefix — the platform adds it when mounting.
The module's web UI routes, as Reitit data. Without the /web prefix — the platform adds it when mounting.
(web-ui-enabled? config)False when :wagoe/settings :features :user-web-ui :enabled? is false:
an API-only deployment, where this module contributes no HTML pages.
False when `:wagoe/settings :features :user-web-ui :enabled?` is false: an API-only deployment, where this module contributes no HTML pages.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |