wrap slo endpoints in try/catch pairs
This commit is contained in:
parent
1416db4063
commit
b22c830c98
|
@ -65,21 +65,39 @@ class LassoSPKitEndpoint extends LassoSPKitUrlDispatch {
|
|||
}
|
||||
/** Profiles initiés par l'IdP */
|
||||
function sloBrws() {
|
||||
$profile = $this->getProfileObject();
|
||||
$http_method = $this->limitMethodBrws($this->identifyHttpMethod());
|
||||
$query_string = $this->getQueryString($http_method);
|
||||
return $profile->processRequestSLO($http_method, $query_string);
|
||||
try {
|
||||
$profile = $this->getProfileObject();
|
||||
$http_method = $this->limitMethodBrws($this->identifyHttpMethod());
|
||||
$query_string = $this->getQueryString($http_method);
|
||||
return $profile->processRequestSLO($http_method, $query_string);
|
||||
} catch (LassoError $e) {
|
||||
return $e->getCode();
|
||||
} catch (Exception $e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
function sloSoap() {
|
||||
$profile = $this->getProfileObject();
|
||||
return $profile->processSOAPRequestSLO();
|
||||
try {
|
||||
$profile = $this->getProfileObject();
|
||||
return $profile->processSOAPRequestSLO();
|
||||
} catch (LassoError $e) {
|
||||
return $e->getCode();
|
||||
} catch (Exception $e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
/** Profiles initiés par le SP */
|
||||
function sloReturn() {
|
||||
$profile = $this->getProfileObject();
|
||||
$http_method = $this->limitMethodBrws($this->identifyHttpMethod());
|
||||
$query_string = $this->getQueryString($http_method);
|
||||
return $profile->processResponseSLO($http_method, $query_string);
|
||||
try {
|
||||
$profile = $this->getProfileObject();
|
||||
$http_method = $this->limitMethodBrws($this->identifyHttpMethod());
|
||||
$query_string = $this->getQueryString($http_method);
|
||||
return $profile->processResponseSLO($http_method, $query_string);
|
||||
} catch (LassoError $e) {
|
||||
return $e->getCode();
|
||||
} catch (Exception $e) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
function identifyHttpMethod() {
|
||||
if (isset($_POST) && ( isset($_POST['SAMLResponse']) || isset($_POST['SAMLRequest']))) {
|
||||
|
|
Reference in New Issue