sec_get_random_cached_token_id (public)

 sec_get_random_cached_token_id

Defined in packages/acs-tcl/tcl/security-procs.tcl

Randomly returns a token_id from the token cache

Partial Call Graph (max 5 caller/called nodes):
%3 test_secret_tokens_get secret_tokens_get (test acs-tcl) sec_get_random_cached_token_id sec_get_random_cached_token_id test_secret_tokens_get->sec_get_random_cached_token_id sec_populate_secret_tokens_thread_cache sec_populate_secret_tokens_thread_cache (private) sec_get_random_cached_token_id->sec_populate_secret_tokens_thread_cache ad_sign ad_sign (public) ad_sign->sec_get_random_cached_token_id packages/acs-subsite/lib/login.tcl packages/acs-subsite/ lib/login.tcl packages/acs-subsite/lib/login.tcl->sec_get_random_cached_token_id security::parameter::signed security::parameter::signed (public) security::parameter::signed->sec_get_random_cached_token_id

Testcases:
secret_tokens_get
Source code:
    #set list_of_names [ns_cache names secret_tokens]
    set list_of_names [array names ::security::tcl_secret_tokens]
    if {[llength $list_of_names] == 0} {
        sec_populate_secret_tokens_thread_cache
        set list_of_names [array names ::security::tcl_secret_tokens]
    }

    set random_seed [ns_rand [llength $list_of_names]]
    return [lindex $list_of_names $random_seed]
Generic XQL file:
packages/acs-tcl/tcl/security-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/security-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/security-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: