nsmcp::SystemLogSummary object method requestMetadata (public)

 nsmcp::SystemLogSummary[i] requestMetadata text redactor

Defined in /usr/local/ns/tcl/nsmcp/log-summary.tcl

Extract bounded authentication and User-Agent evidence from warning diagnostics. Retain authentication state without retaining the OpenACS user ID.

Parameters:
text (required)
redactor (required)

Testcases:
No testcase defined.
Source code:
set result {authenticationState unknown authenticationSource unavailable}
if {[regexp -line {^:[ \t]+(?:GET|POST|HEAD|PUT|DELETE|OPTIONS|PATCH|CONNECT|TRACE) [^\r\n]* user_id ([^ \t\r\n]+)(?: user_agent[^\r\n]*)?[ \t]*$} $text -> id]
    && [regexp {^[0-9]{1,18}$} $id]} {
    scan $id %lld value
    dict set result authenticationState [expr {$value == 0 ? "anonymous" : "authenticated"}]
    dict set result authenticationSource system-log
}
return [dict merge $result [::nsmcp::warningUserAgent $text $redactor]]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: