add name id management endpoints
This commit is contained in:
parent
48a7a7b067
commit
aed8163ae2
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue