Name

check_auth — check if this IP address is authorised for access

Synopsis

use Wacs;
check_auth(ip_address,  
 vocal_error); 
scalar ip_address;
scalar vocal_error;
 

Summary

check_auth checks whether the passed IP address is authorised for access to this Wacs server at this time. This authorisation may be by either permanent or lease permission based upon the calling IP address. This IP address is specified by the first parameter to the function. The second parameter controls what will be done about it: if the value is 0 (zero), the call will merely terminate the session by exiting the program; if the value is 1 (one), an authorisation error HTML page will be displayed offering the user the option to log in. In the Perl version, an additional option of 2 (two) is available which outputs a failure icon in the case of an expired lease and a request for an image file - this is not possible in PHP as the content type of text/html has already been determined.

Availability

check_auth is available in both perl and php.