add try catch in _soap_ methods
This commit is contained in:
parent
1d9f9d80b7
commit
8d6f23e344
|
@ -168,10 +168,14 @@ function lassospkit_get_assertion_attributes() {
|
||||||
to find one session return an error code.
|
to find one session return an error code.
|
||||||
*/
|
*/
|
||||||
function lassospkit_soap_logout() {
|
function lassospkit_soap_logout() {
|
||||||
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
|
try {
|
||||||
$session = new $session_class();
|
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
|
||||||
$saml2 = new LassoSPKitSAML2($session);
|
$session = new $session_class();
|
||||||
$ret = $saml2->initiateSLO(LASSO_HTTP_METHOD_SOAP);
|
$saml2 = new LassoSPKitSAML2($session);
|
||||||
|
$ret = $saml2->initiateSLO(LASSO_HTTP_METHOD_SOAP);
|
||||||
|
} catch (LassoError $e) {
|
||||||
|
$ret = $e->getCode();
|
||||||
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,10 +184,14 @@ function lassospkit_soap_logout() {
|
||||||
the userId associated to the nameId. If it is still impossible
|
the userId associated to the nameId. If it is still impossible
|
||||||
to find ones identity return an error code. */
|
to find ones identity return an error code. */
|
||||||
function lassospkit_soap_defederate() {
|
function lassospkit_soap_defederate() {
|
||||||
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
|
try {
|
||||||
$session = new $session_class();
|
$session_class = "LassoSPKit" . LassoSPKitConfig::get('session');
|
||||||
$saml2 = new LassoSPKitSAML2($session);
|
$session = new $session_class();
|
||||||
$ret = $saml2->initiateFTNotification(LASSO_HTTP_METHOD_SOAP);
|
$saml2 = new LassoSPKitSAML2($session);
|
||||||
|
$ret = $saml2->initiateFTNotification(LASSO_HTTP_METHOD_SOAP);
|
||||||
|
} catch (LassoError $e) {
|
||||||
|
$ret = $e->getCode();
|
||||||
|
}
|
||||||
lassospkit_clean();
|
lassospkit_clean();
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue