auth::login_attempts::all_entries (private)
auth::login_attempts::all_entries
Defined in packages/acs-authentication/tcl/authentication-procs-naviserver.tcl
Get all login attempts
- Returns:
- list of triples in the form {key1 timeout1 number_of_attempts1 key2 ...}
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set result [list] # # The function "ns_cache_stats" is actually not intended for # application programs, since - historically speaking - the # detailed status change over time. However, we have currently no # function to obtain the expire time for a cache entry, so we use # it here with caution. # set contents [ns_cache_stats -contents -- ns:memoize] foreach entry $contents { lassign $entry key size hits expire if {![string match "login-attempt-*" $key]} { continue } # # In general, we face here a race condition. The entry for the # keys might have timed out. So, the cache lookup might # fail. So, we provide a "value" with an empty string as # default. # if {![ns_cache_get ns:memoize $key value]} { set value "" } lappend result [string range $key 14 end] [ns_time seconds $expire] $value } return $resultXQL Not present: Generic, PostgreSQL, Oracle