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 the user. Puts the authenticate-user result on the context
as :session; an exception halts the pipeline.
Authenticates the user. Puts the `authenticate-user` result on the context as :session; an exception halts the pipeline.
(create-session-creation-pipeline)Creates pipeline for creating a session (login). HTTP only: the CLI has no way to log in (BOU-691).
Creates pipeline for creating a session (login). HTTP only: the CLI has no way to log in (BOU-691).
(create-session-invalidation-pipeline)Creates the HTTP pipeline for invalidating a session (logout).
Creates the HTTP pipeline for invalidating a session (logout).
(create-session-validation-pipeline)Creates the HTTP pipeline for validating a session token.
Creates the HTTP 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. Op metrics (universal; its :leave sees the outcome of everything after it) 4. Input validation (user-specific) 5. Data transformation (user-specific) 6. Business logic invocation (user-specific) 7. Response formatting (user-specific) 8. Effects dispatch (universal) 9. Logging 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.
Soft-deletes the user account.
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.
200 with the session, 200 with requiresMfa when a second factor is still
needed, otherwise the error from login-refusal.
200 with the session, 200 with requiresMfa when a second factor is still needed, otherwise the error from `login-refusal`.
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.
(lockout-response retry-after opts)The 429 for an account locked until retry-after, telling the caller when
to retry in the body and in Retry-After.
The 429 for an account locked until `retry-after`, telling the caller when to retry in the body and in Retry-After.
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
Normalizes the login body: email/password, device info and MFA code.
Normalizes the login body: email/password, device info and MFA code.
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): email + password. A user id
is not a credential, and authenticate-user never read one (BOU-690).
Validates input for creating a session (login): email + password. A user id is not a credential, and `authenticate-user` never read one (BOU-690).
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 CLI: Validates opts has id
Validates input for updating a user. HTTP: Validates path has id parameter CLI: Validates opts has id
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 |