Index: openacs-4/packages/auth-server/tcl/auth-server-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/auth-server/tcl/auth-server-procs.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/auth-server/tcl/auth-server-procs.tcl 8 Oct 2003 11:30:23 -0000 1.1 +++ openacs-4/packages/auth-server/tcl/auth-server-procs.tcl 8 Oct 2003 11:55:08 -0000 1.2 @@ -1,5 +1,7 @@ ad_library { Library routines for authentication server. + + @cvs-id $Id$ } namespace eval auth::server {} Index: openacs-4/packages/auth-server/tcl/test/auth-server-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/auth-server/tcl/test/auth-server-test-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/auth-server/tcl/test/auth-server-test-procs.tcl 8 Oct 2003 11:55:08 -0000 1.1 @@ -0,0 +1,24 @@ +ad_library { + Automated tests. + + @cvs-id $Id: auth-server-test-procs.tcl,v 1.1 2003/10/08 11:55:08 lars Exp $ +} + +aa_register_case auth_server { + Test authentication server. +} { + aa_run_with_teardown \ + -rollback \ + -test_code { + + set token [auth::server::generate_token] + aa_false "Token is not empty" [empty_string_p $token] + + aa_equals "Token verified OK" [auth::server::verify_token -token $token] [ad_conn user_id] + + aa_equals "Token doesn't verify twice" [auth::server::verify_token -token $token] {} + + aa_equals "Random wrong token doesn't verify" [auth::server::verify_token -token "[ad_generate_random_string 40]123"] {} + } +} +