User-specific interceptors for the user creation pipeline.
These interceptors handle user domain-specific concerns like:
User-specific interceptors for the user creation pipeline. These interceptors handle user domain-specific concerns like: - User input validation (required fields, types) - User data transformation (normalization, type conversion) - User business logic invocation (register-user service call) - User-specific response formatting
Authenticates user and creates session.
Returns either:
Authenticates user and creates session. Returns either: - A session with :token when authentication succeeds - A map with :requires-mfa? true when MFA verification is needed - Throws exception on authentication failure
(create-session-creation-pipeline interface-type)Creates pipeline for creating a session (login).
Creates pipeline for creating a session (login).
(create-session-invalidation-pipeline interface-type)Creates pipeline for invalidating a session (logout).
Creates pipeline for invalidating a session (logout).
(create-session-validation-pipeline interface-type)Creates pipeline for validating a session token.
Creates pipeline for validating a session token.
(create-user-creation-pipeline interface-type)Creates the complete user creation interceptor pipeline.
Pipeline stages:
Args: interface-type: :http or :cli
Returns: Vector of interceptors for the pipeline
Creates the complete user creation interceptor pipeline. Pipeline stages: 1. Context setup (universal) 2. Logging start (universal) 3. Input validation (user-specific) 4. Data transformation (user-specific) 5. Business logic invocation (user-specific) 6. Response formatting (user-specific) 7. Effects dispatch (universal) 8. Logging completion (universal) 9. Metrics completion (universal) 10. Response shaping (universal) Args: interface-type: :http or :cli Returns: Vector of interceptors for the pipeline
(create-user-delete-pipeline interface-type)Creates pipeline for deleting (deactivating) a user.
Creates pipeline for deleting (deactivating) a user.
(create-user-get-pipeline interface-type)Creates pipeline for getting a single user by ID.
Creates pipeline for getting a single user by ID.
(create-user-list-pipeline interface-type)Creates pipeline for listing users with pagination.
Creates pipeline for listing users with pagination.
(create-user-update-pipeline interface-type)Creates pipeline for updating an existing user.
Creates pipeline for updating an existing user.
Deactivates (soft deletes) the user account.
Deactivates (soft deletes) the user account.
Fetches the current user for update validation.
Fetches the current user for update validation.
Fetches user by ID from the service.
Fetches user by ID from the service.
Formats the created session or MFA-required response.
Handles three cases:
Formats the created session or MFA-required response. Handles three cases: - MFA required: Returns 200 with requiresMfa flag and limited user info - Authentication success: Returns 200 with session token and user details - CLI: Returns appropriate status and data for command-line interface
Formats the session invalidation response.
Formats the session invalidation response.
Formats the session validation response.
Formats the session validation response.
Formats the successful user creation response based on interface type.
HTTP: Returns 201 status with camelCase JSON body CLI: Returns success status with user data for formatting
Formats the successful user creation response based on interface type. HTTP: Returns 201 status with camelCase JSON body CLI: Returns success status with user data for formatting
Formats the deletion response.
Formats the deletion response.
Formats single user response based on interface type.
Formats single user response based on interface type.
Formats the update response.
Formats the update response.
Formats the list of users for response with pagination support.
Formats the list of users for response with pagination support.
Invalidates (logs out) the session.
Invalidates (logs out) the session.
Invokes the core user registration business logic.
Calls ports/register-user with the normalized user-data. Adds the created user result to context for response formatting.
Invokes the core user registration business logic. Calls ports/register-user with the normalized user-data. Adds the created user result to context for response formatting.
Transforms and normalizes list users parameters.
HTTP: Extracts query params CLI: Extracts options from opts
Transforms and normalizes list users parameters. HTTP: Extracts query params CLI: Extracts options from opts
Transforms and normalizes session creation data.
HTTP: Supports both userId and email/password flows, extracts device info and MFA code CLI: Uses provided data, handles both user-id and email/password flows with MFA support
Transforms and normalizes session creation data. HTTP: Supports both userId and email/password flows, extracts device info and MFA code CLI: Uses provided data, handles both user-id and email/password flows with MFA support
Transforms and normalizes user creation input data.
HTTP: Converts camelCase to kebab-case CLI: Normalizes data types, ensures consistent field names
Adds the normalized user-data to context for downstream interceptors.
Transforms and normalizes user creation input data. HTTP: Converts camelCase to kebab-case CLI: Normalizes data types, ensures consistent field names Adds the normalized user-data to context for downstream interceptors.
Transforms user ID for deletion.
HTTP: Converts string ID to UUID CLI: Uses UUID directly (already parsed)
Transforms user ID for deletion. HTTP: Converts string ID to UUID CLI: Uses UUID directly (already parsed)
Transforms user ID to UUID for internal use.
Transforms user ID to UUID for internal use.
Transforms user update data.
HTTP: Converts string ID to UUID, normalizes field names CLI: Normalizes field names
Transforms user update data. HTTP: Converts string ID to UUID, normalizes field names CLI: Normalizes field names
Validates input parameters for listing users.
HTTP: Validates query parameters (:limit, :offset) CLI: Validates opts (:limit, :offset)
Validates input parameters for listing users. HTTP: Validates query parameters (:limit, :offset) CLI: Validates opts (:limit, :offset)
Validates input for creating a session (login).
HTTP: Validates body has either userId OR (email + password) CLI: Validates opts has user-id (or email/password for authentication)
Validates input for creating a session (login). HTTP: Validates body has either userId OR (email + password) CLI: Validates opts has user-id (or email/password for authentication)
Validates session token input. URL-decodes the token from the path parameter to handle percent-encoded chars.
Validates session token input. URL-decodes the token from the path parameter to handle percent-encoded chars.
Validates required fields for user creation.
HTTP: Validates request body has email, name, role, and optionally password CLI: Validates opts has email, name, role, and optionally password
On validation error, adds validation details to context and throws.
Validates required fields for user creation. HTTP: Validates request body has email, name, role, and optionally password CLI: Validates opts has email, name, role, and optionally password On validation error, adds validation details to context and throws.
Validates input for deleting (deactivating) a user.
HTTP: Validates path has id parameter CLI: Validates opts has id parameter
Validates input for deleting (deactivating) a user. HTTP: Validates path has id parameter CLI: Validates opts has id parameter
Validates user ID input for get operations.
Validates user ID input for get operations.
Validates the session token.
Validates the session token.
Validates input for updating a user.
HTTP: Validates path has id parameter and body has update fields CLI: Validates opts has id and update fields
Validates input for updating a user. HTTP: Validates path has id parameter and body has update fields CLI: Validates opts has id and update fields
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 |