Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:latest:extendedfunctions [2016/07/19 12:10]
127.0.0.1 external edit
documentation:latest:extendedfunctions [2019/01/15 15:54] (current)
Line 13: Line 13:
  
 Inside this jail, you can access to: Inside this jail, you can access to:
 +  * all session values and CGI environment variables //(through $ENV{<​HTTP_NAME>​})//​
   * Core Perl subroutines (split, pop, map, etc.)   * Core Perl subroutines (split, pop, map, etc.)
   * [[customfunctions|Custom functions]]   * [[customfunctions|Custom functions]]
-  * The [[http://​perldoc.perl.org/​MIME/​Base64.html|encode_base64]] subroutine ​//(be careful with it: you must add an empty string as second argument to avoid inserting "​newline"​ codes)// +  * The [[http://​perldoc.perl.org/​MIME/​Base64.html|encode_base64]] subroutine 
-  * Environment variables, in some cases (through %ENV) +  * [[#​Request ​information|Information ​about current request]]
-  * [[#​Request ​informations|Informations ​about current request]]+
   * [[#Extended functions list|Extended functions]]:​   * [[#Extended functions list|Extended functions]]:​
     * [[#​date|date]]     * [[#​date|date]]
Line 26: Line 26:
     * [[#​iso2unicode|iso2unicode]]     * [[#​iso2unicode|iso2unicode]]
     * [[#​groupMatch|groupMatch]]     * [[#​groupMatch|groupMatch]]
 +    * [[#​encrypt|encrypt]]
 +    * [[#​token|token]]
 +    * [[#​isInNet6|isInNet6]]
  
 <note tip>To know more about the jail, check [[http://​perldoc.perl.org/​Safe.html|Safe module documentation]].</​note>​ <note tip>To know more about the jail, check [[http://​perldoc.perl.org/​Safe.html|Safe module documentation]].</​note>​
  
-===== Request informations ===== 
-The following data about the current request are available through functions : 
-  * hostname 
-  * remote_ip: the client IP address 
-  * uri: URL path 
-  * uri_with_args:​ URL path with query string 
-  * unparsed_uri:​ URL path, before URL decoding 
-  * args: the query string 
-  * method: the request method (GET, POST etc.) 
-  * header_in("​Your-Request-Header"​):​ any request header 
  
 ===== Extended Functions List ===== ===== Extended Functions List =====
Line 156: Line 149:
 ==== groupMatch ==== ==== groupMatch ====
  
-this function allows to parse the ''​$hGroups''​ variable to check if a value is present inside a group attribute.+this function allows ​one to parse the ''​$hGroups''​ variable to check if a value is present inside a group attribute.
  
 Function parameter: Function parameter:
Line 166: Line 159:
 <​code>​ <​code>​
 groupMatch($hGroups,​ '​description',​ '​Service 1') groupMatch($hGroups,​ '​description',​ '​Service 1')
 +</​code>​
 +
 +==== encrypt ====
 +
 +<note tip>​Since version 2.0, this function is now compliant with [[safejail|Safe jail]].</​note>​
 +
 +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.
 +
 +<​code>​
 +encrypt($_whatToTrace)
 +</​code>​
 +
 +==== token ====
 +
 +This function generates token used to [[documentation:​2.0:​servertoserver|handle server webservice calls]].
 +
 +<​code>​
 +token($_session_id,'​webapp1.example.com','​webapp2.example.com'​)
 +</​code>​
 +
 +==== isInNet6 ====
 +
 +Function to check if an IPv6 address is in a subnet. Example //check if IP address is local//:
 +
 +<code perl>
 +isInNet6($ipAddr,​ '​fe80::/​10'​)
 </​code>​ </​code>​