Unibase application access sessions
Unibase provides uses a session structure to manage logins and access to all application programs.
There is no direct access to either the application programs or data and these must be accessed through ubpost which uses the session id to determine the user, application, and working directory.
Tcl scripts
Sessions are maintained by the unibase.tcl package.
To access the commands from a Tcl script:
package require unibase 1.0
Available commands:
::unibase::httpd | httpd helper functions |
::unibase::httpd::cookies | Put cookies into the environment |
::unibase::log | System log and audit functions |
::unibase::session | Setup and maintain a session |
::unibase::users | User details for application security |
Getting a session id from a script
curl(1) can be used in a script to access programs and features in a Unibase application.
curl -s -d username=<user> -d password=<password> -c <Session id file> http://<application site>/cgi-bin/session
eg
curl -s -d username=fred -d password=abc123 -c sessionId http://forum.zenucom.com/cgi-bin/session
Once you have a session you can use that with your curl request to get access to application functions.
eg
shops=`curl -s --form PROC_NAME=getShops -b sessionId http://forum.zenucom.com/cgi-bin/ubpost`