add documentation for lassospkit_login_url

This commit is contained in:
<bdauvergne@entrouvert.com> 1207755062 +0200 0001-01-01 00:00:00 +00:00
parent 4c1bd996fc
commit d26e5eabeb
1 changed files with 10 additions and 2 deletions

View File

@ -81,8 +81,16 @@ function lassospkit_set_federation($federation) {
LassoSPKitUtilsSession::setFederation($federation);
}
/* Return the URL where to redirect a user when liberty authentification
* is required for existing federation or to get a transient one.
/* Return the URL where to redirect a user to ask for
* an authentification assertion from the IdP without creating
* new federation.
* Second arguments is an array of options. Possible options are:
* - "persistent" => Bool, wether to get an existing persistent
* session or get a one-time federation identifier.
* - "passive" => Bool, forbid user interaction by the IdP.
* For example, to verify "transparently" (there is still the redirect latency)
* if an user is currently logged to the IdP, just do:
* header("Location: " . lassospkit_login_url($login_page, array("passive" => TRUE)))
*/
function lassospkit_login_url($return_url, $options = array() ) {
$params = LassoSPKitUtils::extract_options(array('persistent' => 'b', 'passive' => 'b'), $options);