Expand description
The data contracts the reference passes between the configuration surface, the block hook, and the response-side pass.
BlockPayloadis the referenceon_blockpayload, key for key (build_block_payload, which stays facade-side next to the redaction it runs the path through).RequestBits/ResponseBitsare the plain views the response processor reads and the adapter fill in;ResponseModifierFnis the referencecustom_response_modifierseam over them.
The types live in the engine so the unified SecurityConfig surface
(the next slice of the fieldization train) can type every hook field
without reaching into a framework layer; the facade re-exports them
under their historical paths.
Structs§
- Block
Payload - The reference block payload, key for key
(
build_block_payload).patharrives pre-redacted;status_codeisNoneon the passive-mode path, where no response is ever sent. - Request
Bits - The plain request view the response-side pass reads: method, path,
resolved client identity, and the
Originheader when the request carried one. - Response
Bits - The mutable response view the response-side pass and the
custom_response_modifierseam write.
Constants§
- ON_
BLOCK_ EXCLUDED_ CHECK_ NAMES - The check names the reference never fires the block hook for
(
ON_BLOCK_EXCLUDED_CHECK_NAMES): the two application-authored checks and the HTTPS redirect, which is not a block.
Type Aliases§
- OnBlock
Hook - The
on_blockcallback type: sync, best-effort, never fatal (SecurityConfig.on_block). - OnError
Fn - The
on_errorcallback type (SecurityConfig.on_error, the referenceCallable[[str, BaseException, dict], None]). - Response
Modifier Fn - The
custom_response_modifiercallback type (SecurityConfig.custom_response_modifier).