Liking cljdoc? Tell your friends :D

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

create-session-creation-pipelineclj

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

create-session-invalidation-pipelineclj

(create-session-invalidation-pipeline)

Creates the HTTP pipeline for invalidating a session (logout).

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

create-session-validation-pipelineclj

(create-session-validation-pipeline)

Creates the HTTP pipeline for validating a session token.

Creates the HTTP 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. 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

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

Soft-deletes the user account.

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

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`.
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

lockout-responseclj

(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.
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

Normalizes the login body: email/password, device info and MFA code.

Normalizes the login body: email/password, device info and MFA code.
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): 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).
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 CLI: Validates opts has id

Validates input for updating a user.

HTTP: Validates path has id parameter
CLI: Validates opts has id
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