security::configured_driver_info (public)

 security::configured_driver_info

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

Return a list of dicts containing type, driver, location and port of all configured drivers

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 security::configured_locations security::configured_locations (private) security::configured_driver_info security::configured_driver_info security::configured_locations->security::configured_driver_info security::validated_host_header security::validated_host_header (public) security::validated_host_header->security::configured_driver_info subsite::get_url subsite::get_url (public) subsite::get_url->security::configured_driver_info

Testcases:
No testcase defined.
Source code:
        set protos {http 80 https 443}
        set result {}
        foreach i [ns_driver info] {
            set type     [dict get $i type]
            set location [dict get $i location]
            set proto    [dict get $i protocol]
            if {$location ne ""} {
                set li [ns_parseurl $location]

                if {[dict exists $li port]} {
                    set port [dict get $li port]
                    set suffix ":$port"
                } else {
                    set port [dict get $protos $proto]
                    set suffix ""
                }
            } else {
                #
                # In case we have no "location" defined (e.g. virtual
                # hosting), get "port" and suffix directly from the
                # driver.
                #
                if {[dict exists $i port]} {
                    set port [lindex [dict get $i port] 0]
                    set defaultport [dict get $i defaultport]
                } else {
                    set driver_section [ns_driversection -driver [dict exists $i module]]
                    set port [ns_config -int $driver_section port]
                    set defaultport [dict get $protos $proto]
                }
                #
                # Newer versions of NaviServer support multiple ports
                # per driver. For now, take the first one (similar with "address" below).
                #
                set port [lindex [dict get $i port] 0]
                if {$port eq $defaultport} {
                    set suffix ""
                } else {
                    set suffix ":$port"
                }
            }
            lappend result [list  proto $proto  driver [dict get $i module]  host [lindex [dict get $i address] 0]  location $location port $port suffix $suffix]
        }
        return $result
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: