add an implementation of FTNotification
This commit is contained in:
parent
8356925f73
commit
b92945e62c
|
@ -14,4 +14,44 @@ class LassoSPKitLiberty extends LassoSPKitSAMLCommon {
|
|||
$request = $login->request;
|
||||
$request->NameIDPolicy = $blob;
|
||||
}
|
||||
public function initiateFTNotification($method = LASSO_HTTP_METHOD_SOAP, $remoteID = null) {
|
||||
$code = null;
|
||||
$response = null;
|
||||
$defederation = new LassoDefederation($this->server);
|
||||
$retFF = $this->findFederation($defederation);
|
||||
if ($retFF) {
|
||||
return $retFF;
|
||||
}
|
||||
$retIN = $defederation->initNotification($remoteID, $method);
|
||||
$retBN = $defederation->buildNotificationMsg();
|
||||
if ($retIN || $retBN) {
|
||||
lassospkit_errlog("initiateFTNotification, retIN: $retIN retBN: $retBN");
|
||||
}
|
||||
switch ($method) {
|
||||
case LASSO_HTTP_METHOD_REDIRECT:
|
||||
$this->keepProfile($defederation);
|
||||
$this->finishRedirectRequest($defederation);
|
||||
break;
|
||||
case LASSO_HTTP_METHOD_SOAP:
|
||||
$this->finishSOAPRequest($defederation, $response, $code);
|
||||
break;
|
||||
case LASSO_HTTP_METHOD_ARTIFACT_GET:
|
||||
case LASSO_HTTP_METHOD_ARTIFACT_POST:
|
||||
case LASSO_HTTP_METHOD_POST:
|
||||
default:
|
||||
LassoSPKitHelper::notImplemented();
|
||||
}
|
||||
LassoSPKitSamlCommon::initiateFTNotification($method, $remoteID);
|
||||
if ($retIN) {
|
||||
return $retIN;
|
||||
}
|
||||
if ($retBN) {
|
||||
return $retBN;
|
||||
}
|
||||
if ($code != "200") {
|
||||
lassospkit_errlog('initiateFTNotification, IdP returned non-200 HTTP result code: ' . $code);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue