deprecate part of the public API, add defederation soap call

This commit is contained in:
<bdauvergne@entrouvert.com> 1209574242 +0200 0001-01-01 00:00:00 +00:00
parent aed8163ae2
commit 733226d592
1 changed files with 30 additions and 4 deletions

View File

@ -100,6 +100,9 @@ function lassospkit_set_federation($federation) {
* 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)))
*
* DEPRECATED
*
*/
function lassospkit_login_url($return_url, $options = array() ) {
$params = LassoSPKitUtils::extract_options(array('persistent' => 'b', 'passive' => 'b'), $options);
@ -108,7 +111,7 @@ function lassospkit_login_url($return_url, $options = array() ) {
/* Return the URL where to redirect a user to create a new federation, or
* get an existing one.
* Eventually pass a username to auto-store the new federation.
* Eventually pass a username to auto-store the new federation. DEPRECATED
*/
function lassospkit_federate_url($return_url) {
return _lassospkit_make_redirect_url('federate',$return_url, array());
@ -121,15 +124,16 @@ function lassospkit_set_userid($userid) {
LassoSPKitUtilsSession::setUserID($userid);
}
/* Return the URL where to redirect a user to initiated defederation of the current nameid. */
/* Return the URL where to redirect a user to initiated defederation of the current nameid. DEPRECATED*/
function lassospkit_defederation_url($return_url) {
return _lassospkit_make_redirect_url('defederate',$return_url, array());
}
/** DEPRECATED */
function lassospkit_logout_url($return_url) {
return _lassospkit_make_redirect_url('slo',$return_url, array());
}
/** DEPRECATED */
function lassospkit_configure_url() {
$url = LassoSPKitConfig::get('baseUrl') . '/configure';
// saml2 or liberty
@ -158,7 +162,11 @@ function lassospkit_get_assertion_attributes() {
$attributes = $session->getAssertionAttributes();
return $attributes;
}
/** Generate a soap logout message for the session associated
to the current nameId's. If none is present try to find one using
the userId associated to the nameId. If it is still impossible
to find one session return an error code.
*/
function lassospkit_soap_logout() {
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
$session = new $session_class();
@ -167,3 +175,21 @@ function lassospkit_soap_logout() {
return $ret;
}
/** Generate and send a SOAP logout request for the defederation
of the first nameId found. If none is present try to find one using
the userId associated to the nameId. If it is still impossible
to find ones identity return an error code. */
function lassospkit_soap_defederate() {
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
$session = new $session_class();
$saml2 = new LassoSPKitSAML2($session);
$ret = $saml2->initiateFTNotification(LASSO_HTTP_METHOD_SOAP);
return $ret;
}
/** Reset the sate of the spkit, clear cache of userid, nameid and attributes
retrieved by precedent liberty exchanges. */
function lassospkit_clean() {
$session = LassoSPKitUtilsSession::getSingleton();
$session->clean();
}