Liking cljdoc? Tell your friends :D

boundary.user.shell.interceptors

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
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
raw docstring

apply-user-updatesclj

Applies updates to the user.

Applies updates to the user.
sourceraw docstring

authenticate-user-sessionclj

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
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
sourceraw docstring

create-session-creation-pipelineclj

(create-session-creation-pipeline interface-type)

Creates pipeline for creating a session (login).

Creates pipeline for creating a session (login).
sourceraw docstring

create-session-invalidation-pipelineclj

(create-session-invalidation-pipeline interface-type)

Creates pipeline for invalidating a session (logout).

Creates pipeline for invalidating a session (logout).
sourceraw docstring

create-session-validation-pipelineclj

(create-session-validation-pipeline interface-type)

Creates pipeline for validating a session token.

Creates pipeline for validating a session token.
sourceraw docstring

create-user-creation-pipelineclj

(create-user-creation-pipeline interface-type)

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

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
sourceraw docstring

create-user-delete-pipelineclj

(create-user-delete-pipeline interface-type)

Creates pipeline for deleting (deactivating) a user.

Creates pipeline for deleting (deactivating) a user.
sourceraw docstring

create-user-get-pipelineclj

(create-user-get-pipeline interface-type)

Creates pipeline for getting a single user by ID.

Creates pipeline for getting a single user by ID.
sourceraw docstring

create-user-list-pipelineclj

(create-user-list-pipeline interface-type)

Creates pipeline for listing users with pagination.

Creates pipeline for listing users with pagination.
sourceraw docstring

create-user-update-pipelineclj

(create-user-update-pipeline interface-type)

Creates pipeline for updating an existing user.

Creates pipeline for updating an existing user.
sourceraw docstring

deactivate-user-accountclj

Deactivates (soft deletes) the user account.

Deactivates (soft deletes) the user account.
sourceraw docstring

fetch-current-user-for-updateclj

Fetches the current user for update validation.

Fetches the current user for update validation.
sourceraw docstring

fetch-user-by-idclj

Fetches user by ID from the service.

Fetches user by ID from the service.
sourceraw docstring

fetch-usersclj

Fetches all users with options.

Fetches all users with options.
sourceraw docstring

format-session-creation-responseclj

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 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
sourceraw docstring

format-session-invalidation-responseclj

Formats the session invalidation response.

Formats the session invalidation response.
sourceraw docstring

format-session-validation-responseclj

Formats the session validation response.

Formats the session validation response.
sourceraw docstring

format-user-creation-responseclj

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
sourceraw docstring

format-user-delete-responseclj

Formats the deletion response.

Formats the deletion response.
sourceraw docstring

format-user-responseclj

Formats single user response based on interface type.

Formats single user response based on interface type.
sourceraw docstring

format-user-update-responseclj

Formats the update response.

Formats the update response.
sourceraw docstring

format-users-list-responseclj

Formats the list of users for response with pagination support.

Formats the list of users for response with pagination support.
sourceraw docstring

invalidate-user-sessionclj

Invalidates (logs out) the session.

Invalidates (logs out) the session.
sourceraw docstring

invoke-user-registrationclj

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.
sourceraw docstring

transform-list-users-paramsclj

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
sourceraw docstring

transform-session-creation-dataclj

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
sourceraw docstring

transform-user-creation-dataclj

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.
sourceraw docstring

transform-user-delete-idclj

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)
sourceraw docstring

transform-user-idclj

Transforms user ID to UUID for internal use.

Transforms user ID to UUID for internal use.
sourceraw docstring

transform-user-update-dataclj

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
sourceraw docstring

validate-list-users-inputclj

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)
sourceraw docstring

validate-session-creation-inputclj

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)
sourceraw docstring

validate-session-token-inputclj

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.
sourceraw docstring

validate-user-creation-inputclj

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.
sourceraw docstring

validate-user-delete-inputclj

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
sourceraw docstring

validate-user-id-inputclj

Validates user ID input for get operations.

Validates user ID input for get operations.
sourceraw docstring

validate-user-sessionclj

Validates the session token.

Validates the session token.
sourceraw docstring

validate-user-update-inputclj

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
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close