When <ahref="writingrulesand_headers.html"class="wikilink1"title="documentation:2.0:writingrulesand_headers">writing rules and headers</a>, you can use Perl expressions that will be evaluated in a jail, to prevent bad code execution.
<liclass="level1"><divclass="li"> The <ahref="http://perldoc.perl.org/MIME/Base64.html"class="urlextern"title="http://perldoc.perl.org/MIME/Base64.html"rel="nofollow">encode_base64</a> subroutine</div>
</li>
<liclass="level1"><divclass="li"> Environment variables, in some cases (through %ENV)</div>
<liclass="level1"><divclass="li"><ahref="#request_information"title="documentation:2.0:extendedfunctions ↵"class="wikilink1">Information about current request</a></div>
<divclass="notetip">To know more about the jail, check <ahref="http://perldoc.perl.org/Safe.html"class="urlextern"title="http://perldoc.perl.org/Safe.html"rel="nofollow">Safe module documentation</a>.
This function will check the day and the hour of current request, and compare it to allowed days and hours. It returns 1 if this match, 0 else.
All e
By default, the allowed days and hours is an hexadecimal value, representing each hour of the week. A day has 24 hours, and a week 7 days, so the value contains 168 bits, converted into 42 hexadecimal characters. Sunday is the first day.
</p>
<p>
For example, for a full access, excepted week-end:
<divclass="notetip">The <ahref="authldap.html#schema_extension"class="wikilink1"title="documentation:2.0:authldap">LDAP schema extension</a> can be used to store this value. You can also use the binary value from the logonHours attribute of Active Directory
If you manage different timezones, you have to take the jetlag into account in ssoLogonHours values, or use the $_timezone parameter. This parameter is set by the portal and use javascript to get the connected user timezone. It should works on every browser:
You can modify the default behavior for people without value in ssoLogonHours. Indeed, by default, users without logon hours values are rejected. You can allow these users instead of reject them:
This function will check the date of current request, and compare it to a start date and an end date. It returns 1 if this match, 0 else.
</p>
<divclass="notetip">The <ahref="authldap.html#schema_extension"class="wikilink1"title="documentation:2.0:authldap">LDAP schema extension</a> can be used to store these values
</div>
<p>
The date format is the LDAP date syntax, for example for the 1st March 2009:
</p>
<preclass="code">20090301000000Z</pre>
<p>
Functions parameters:
</p>
<ul>
<liclass="level1"><divclass="li"><strong>start</strong>: Start date (GMT)</div>
</li>
<liclass="level1"><divclass="li"><strong>end</strong>: End date (GMT)</div>
</li>
<liclass="level1"><divclass="li"><strong>default_access</strong> (optional): what result to return if <strong>start</strong> and <strong>end</strong> are empty</div>
<divclass="noteimportant">This function is not compliant with <ahref="safejail.html"class="wikilink1"title="documentation:2.0:safejail">Safe jail</a>, you will need to disable the jail to use it.
</div>
<p>
This function builds the <code>Authorization</code> HTTP header used in <ahref="applications/authbasic.html"class="wikilink1"title="documentation:2.0:applications:authbasic">HTTP Basic authentication scheme</a>. It will force conversion from UTF-8 to ISO-8859-1 of user and password data.
<divclass="noteimportant">This function is not compliant with <ahref="safejail.html"class="wikilink1"title="documentation:2.0:safejail">Safe jail</a>, you will need to disable the jail to use it.
</div>
<p>
This function convert a string from UTF-8 to ISO-8859-1.
<divclass="noteimportant">This function is not compliant with <ahref="safejail.html"class="wikilink1"title="documentation:2.0:safejail">Safe jail</a>, you will need to disable the jail to use it.
</div>
<p>
This function convert a string from ISO-8859-1 to UTF-8.
<divclass="noteimportant">This function is not compliant with <ahref="safejail.html"class="wikilink1"title="documentation:2.0:safejail">Safe jail</a>, you will need to disable the jail to use it.
</div>
<p>
This function uses the secret key of LLNG configuration to crypt a data. This can be used to anonymize identifier given to the protected application.