send_auth_audit

Function send_auth_audit 

Source
pub async fn send_auth_audit(
    kafka_opt: Option<&Kafka>,
    outcome: &str,
    username: &str,
    source_ip: &str,
    site: &str,
)
Expand description

Send a structured audit event for an /api/v1/auth/token attempt.

Used by the server’s auth handler — there is no JWT yet (the user is asking for one), so identity is captured from the submitted username rather than extracted from a token. The password is never logged.

Always Kafka-only; failures log a warning and do not abort the outer auth flow.