respondWithAuthorizationFailure(target: ErrorResponderTarget,failure: AuthorizationFailure): void
Write the framework-standard response for an authorization refusal.
This keeps guards and decorator middleware byte-identical without coupling
either plugin to the other's implementation. Every arm writes through
respondWithError, so the refusal answers in whatever error format
the application configured rather than a shape of this function's own.
The insufficient-privileges detail is deliberately fixed text: naming the
role or permission a caller lacks tells an unauthorized caller what to
acquire.
target: ErrorResponderTarget
The request context or response to write the refusal to
failure: AuthorizationFailure
Which refusal to write