add name id management endpoints

This commit is contained in:
<bdauvergne@entrouvert.com> 1209574203 +0200 0001-01-01 00:00:00 +00:00
parent 48a7a7b067
commit aed8163ae2
1 changed files with 17 additions and 1 deletions

View File

@ -13,7 +13,11 @@ class LassoSPKitSaml2Endpoint extends LassoSPKitEndpoint {
$this->addDispatch('/metadata','metadata');
}
function getProfileObject() {
return new LassoSPKitSAML2($this->getSession());
static $profile = null;
if ($profile == null) {
$profile = new LassoSPKitSAML2($this->getSession());
}
return $profile;
}
/** Generate metadatas for the SAML2 endpoint */
function metadata() {
@ -32,9 +36,21 @@ class LassoSPKitSaml2Endpoint extends LassoSPKitEndpoint {
}
}
function nameIdManagementBrws() {
// TODO
}
function nameIdManagementSoap() {
try {
$profile = $this->getProfileObject();
return $profile->processSOAPRequestNameIdManagement();
} catch (LassoError $e) {
lassospkit_debuglog('Critical error: ' . $e);
return $e->getCode();
} catch (Exception $e) {
lassospkit_debuglog('Unkown exception error: ' . $e);
return -1;
}
}
function nameIdManagementReturn() {
// TODO
}
}