Index: openacs-4/www/SYSTEM/security-debug.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/SYSTEM/security-debug.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/www/SYSTEM/security-debug.tcl 7 Oct 2003 09:32:32 -0000 1.1 @@ -0,0 +1,68 @@ + +if { ![string match "your-ip-here" [ns_conn peeraddr]] } { + ns_return 200 text/html "Forbidden" + return +} + + +sec_login_handler + +set session_id {} +catch { set session_id [ad_get_signed_cookie_with_expr "ad_session_id"] } + +set ad_user_login {} +catch { set ad_user_login [ad_get_signed_cookie "ad_user_login"] } + +set ad_user_login_secure {} +catch { set ad_user_login_secure [ad_get_signed_cookie "ad_user_login_secure"] } + +set ad_secure_token {} +catch { set ad_secure_token [ad_get_signed_cookie "ad_secure_token"] } + +set auth_expires_in "N/A" + +catch { + set login_list [split [ad_get_signed_cookie "ad_user_login"] ","] + set login_expr [lindex $login_list 1] + set auth_expires_in [expr [sec_login_timeout] - ([ns_time] - $login_expr)] +} + + +ns_return 200 text/html " + +

Debug Page For Security Cookies

+ +

Cookies

+ +

session_id: $session_id

+ +

ad_user_login: $ad_user_login

+ +

ad_user_login_secure: $ad_user_login_secure

+ +

ad_secure_token: $ad_secure_token

+ +

Cookie HTTP header: [ns_set iget [ad_conn headers] Cookie]

+ +

ad_conn

+ +

user_id: [ad_conn user_id]

+ +

untrusted_user_id: [ad_conn untrusted_user_id]

+ +

auth_level: [ad_conn auth_level]

+ +

account_status: [ad_conn account_status]

+ +

Authentication

+ +

Authentication expires in: $auth_expires_in

+ +

LoginTimeout: [sec_login_timeout]

+ +[ad_decode [ad_conn untrusted_user_id] 0 "" "

auth_token: [sec_get_user_auth_token [ad_conn untrusted_user_id]]

"] + +

Change auth token

+ +" +